Class EventRateSimpleMovingAverage
- java.lang.Object
-
- org.terracotta.statistics.derived.EventRateSimpleMovingAverage
-
- All Implemented Interfaces:
ChainedEventObserver,ChainedObserver,ValueStatistic<Double>
public class EventRateSimpleMovingAverage extends Object implements ChainedEventObserver, ValueStatistic<Double>
- Author:
- cdennis
-
-
Constructor Summary
Constructors Constructor Description EventRateSimpleMovingAverage(long time, TimeUnit unit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidevent(long time, long latency)Called to indicate an event happened.Doublerate(TimeUnit base)DoublerateUsingSeconds()voidsetWindow(long time, TimeUnit unit)StatisticTypetype()Doublevalue()
-
-
-
Constructor Detail
-
EventRateSimpleMovingAverage
public EventRateSimpleMovingAverage(long time, TimeUnit unit)
-
-
Method Detail
-
setWindow
public void setWindow(long time, TimeUnit unit)
-
value
public Double value()
- Specified by:
valuein interfaceValueStatistic<Double>- Returns:
- The current statistic value
-
type
public StatisticType type()
- Specified by:
typein interfaceValueStatistic<Double>- Returns:
- The statistic type
-
rateUsingSeconds
public Double rateUsingSeconds()
-
event
public void event(long time, long latency)Description copied from interface:ChainedEventObserverCalled to indicate an event happened.- Specified by:
eventin interfaceChainedEventObserver- Parameters:
time- the clock at event completion in nslatency- the event latency in ns
-
-