@@ -209,23 +209,25 @@ class Description
209209 # @param [ Hash ] config The result of the hello command.
210210 # @param [ Float ] average_round_trip_time The moving average time (sec) the hello
211211 # command took to complete.
212- # @param [ Float ] average_round_trip_time The moving average time (sec)
213- # the ismaster call took to complete .
212+ # @param [ Float ] minimum_round_trip_time The minimum round trip time
213+ # of ten last hello commands .
214214 # @param [ true | false ] load_balancer Whether the server is treated as
215215 # a load balancer.
216216 # @param [ true | false ] force_load_balancer Whether the server is
217217 # forced to be a load balancer.
218218 #
219219 # @api private
220220 def initialize ( address , config = { } , average_round_trip_time : nil ,
221- load_balancer : false , force_load_balancer : false
221+ minimum_round_trip_time : 0 , load_balancer : false ,
222+ force_load_balancer : false
222223 )
223224 @address = address
224225 @config = config
225226 @load_balancer = !!load_balancer
226227 @force_load_balancer = !!force_load_balancer
227228 @features = Features . new ( wire_versions , me || @address . to_s )
228229 @average_round_trip_time = average_round_trip_time
230+ @minimum_round_trip_time = minimum_round_trip_time
229231 @last_update_time = Time . now . freeze
230232 @last_update_monotime = Utils . monotonic_time
231233
@@ -302,6 +304,10 @@ def features
302304 # @return [ Float ] The moving average time the hello call took to complete.
303305 attr_reader :average_round_trip_time
304306
307+ # @return [ Float ] The minimum time from the ten last hello calls took
308+ # to complete.
309+ attr_reader :minimum_round_trip_time
310+
305311 # Returns whether this server is an arbiter, per the SDAM spec.
306312 #
307313 # @example Is the server an arbiter?
0 commit comments