C# Class MongoDB.Driver.Internal.PingTimeAggregator

Holds the ping times and a rolling calculated average. This class is thread-safe.
ファイルを表示 Open project: CloudMetal/mongo-csharp-driver Class Usage Examples

Public Methods

Method Description
Clear ( ) : void

Clears this instance.

Include ( System.TimeSpan pingTime ) : void

Includes the specified ping time in the calculation. If there are more times in the bucket than the maxCount, then the oldest one is replaced.

PingTimeAggregator ( int maxCount ) : System

Initializes a new instance of the PingTimeAggregator class.

Method Details

Clear() public method

Clears this instance.
public Clear ( ) : void
return void

Include() public method

Includes the specified ping time in the calculation. If there are more times in the bucket than the maxCount, then the oldest one is replaced.
public Include ( System.TimeSpan pingTime ) : void
pingTime System.TimeSpan The ping time.
return void

PingTimeAggregator() public method

Initializes a new instance of the PingTimeAggregator class.
public PingTimeAggregator ( int maxCount ) : System
maxCount int The max count.
return System