public class BucketingFunction
extends java.lang.Object
| Constructor and Description |
|---|
BucketingFunction(long bucketWidthMs,
int numSignificantBuckets,
int numSignificantSamples,
Combine.BinaryCombineLongFn function) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long timeMsSinceEpoch,
long value)
Add one sample of
value (to bucket) at timeMsSinceEpoch. |
long |
get()
Return the (bucketized) combined value of all samples.
|
boolean |
isSignificant()
Is the current result 'significant'? Ie is it drawn from enough buckets or from enough samples?
|
void |
remove(long timeMsSinceEpoch)
Remove one sample (from bucket) at
timeMsSinceEpoch. |
public BucketingFunction(long bucketWidthMs,
int numSignificantBuckets,
int numSignificantSamples,
Combine.BinaryCombineLongFn function)
public void add(long timeMsSinceEpoch,
long value)
value (to bucket) at timeMsSinceEpoch.public void remove(long timeMsSinceEpoch)
timeMsSinceEpoch.public long get()
public boolean isSignificant()