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>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicReference<EventRateSimpleMovingAverage.CounterPartition>private final Queue<EventRateSimpleMovingAverage.CounterPartition>private static final intprivate longprivate long -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
PARTITION_COUNT
private static final int PARTITION_COUNT- See Also:
-
archive
-
activePartition
-
windowSize
private volatile long windowSize -
partitionSize
private volatile long partitionSize
-
-
Constructor Details
-
EventRateSimpleMovingAverage
-
-
Method Details
-
setWindow
-
value
- Specified by:
valuein interfaceValueStatistic<Double>- Returns:
- The current statistic value
-
type
- Specified by:
typein interfaceValueStatistic<Double>- Returns:
- The statistic type
-
rateUsingSeconds
-
rate
-
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
-
archive
-