C# Class Jellyfish.Commands.Metrics.RollingNumber

Show file Open project: Zenasoft/Jellyfish.Commands Class Usage Examples

Public Methods

Method Description
GetCumulativeSum ( RollingNumberEvent ev ) : long
GetRollingMaxValue ( RollingNumberEvent ev, long startWindowTime = 0L ) : long
GetRollingSum ( RollingNumberEvent ev, long startWindowTime = 0L ) : long
Increment ( RollingNumberEvent ev ) : void
RollingNumber ( int timeInMs, int numberOfBuckets ) : Jellyfish.Commands.Utils
UpdateRollingMax ( RollingNumberEvent ev, long value ) : void

Private Methods

Method Description
GetBuckets ( long startWindowTime ) : IEnumerable

Returns all bucket in reverse order (most recent first)

GetCurrentBucket ( ) : Bucket
GetValueOfLatestBucket ( RollingNumberEvent ev ) : long
GetValues ( RollingNumberEvent ev, long startWindowTime ) : IEnumerable
Reset ( ) : void
RollingNumber ( IClock clock, int timeInMs, int numberOfBuckets ) : Jellyfish.Commands.Utils

Method Details

GetCumulativeSum() public method

public GetCumulativeSum ( RollingNumberEvent ev ) : long
ev RollingNumberEvent
return long

GetRollingMaxValue() public method

public GetRollingMaxValue ( RollingNumberEvent ev, long startWindowTime = 0L ) : long
ev RollingNumberEvent
startWindowTime long
return long

GetRollingSum() public method

public GetRollingSum ( RollingNumberEvent ev, long startWindowTime = 0L ) : long
ev RollingNumberEvent
startWindowTime long
return long

Increment() public method

public Increment ( RollingNumberEvent ev ) : void
ev RollingNumberEvent
return void

RollingNumber() public method

public RollingNumber ( int timeInMs, int numberOfBuckets ) : Jellyfish.Commands.Utils
timeInMs int
numberOfBuckets int
return Jellyfish.Commands.Utils

UpdateRollingMax() public method

public UpdateRollingMax ( RollingNumberEvent ev, long value ) : void
ev RollingNumberEvent
value long
return void