C# Class MongoDB.Driver.Internal.PingTimeAggregator

Holds the ping times and a rolling calculated average. This class is thread-safe.
Afficher le fichier Open project: CloudMetal/mongo-csharp-driver Class Usage Examples

Méthodes publiques

Méthode 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 méthode

Clears this instance.
public Clear ( ) : void
Résultat void

Include() public méthode

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.
Résultat void

PingTimeAggregator() public méthode

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