public class MovingFunction
extends java.lang.Object
samplePeriodMs
, and is updated every sampleUpdateMs
.Constructor and Description |
---|
MovingFunction(long samplePeriodMs,
long sampleUpdateMs,
int numSignificantBuckets,
int numSignificantSamples,
Combine.BinaryCombineLongFn function) |
Modifier and Type | Method and Description |
---|---|
void |
add(long nowMsSinceEpoch,
long value)
Add
value at nowMsSinceEpoch . |
long |
get(long nowMsSinceEpoch)
Return the minimum/maximum/sum of all retained values within samplePeriodMs of
nowMsSinceEpoch . |
boolean |
isSignificant()
Is the current result 'significant'? Ie is it drawn from enough buckets or from enough samples?
|
public MovingFunction(long samplePeriodMs, long sampleUpdateMs, int numSignificantBuckets, int numSignificantSamples, Combine.BinaryCombineLongFn function)
public void add(long nowMsSinceEpoch, long value)
value
at nowMsSinceEpoch
.public long get(long nowMsSinceEpoch)
nowMsSinceEpoch
.public boolean isSignificant()