public class EstimatedHistogram extends Object
Constructor and Description |
---|
EstimatedHistogram() |
EstimatedHistogram(int bucketCount) |
EstimatedHistogram(long[] offsets,
long[] bucketData) |
Modifier and Type | Method and Description |
---|---|
void |
add(long n)
Increments the count of the bucket closest to n, rounding UP.
|
long |
count() |
boolean |
equals(Object o) |
long[] |
getBucketOffsets() |
long[] |
getBuckets(boolean reset) |
int |
hashCode() |
boolean |
isOverflowed() |
void |
log(org.slf4j.Logger log)
log.debug() every record in the histogram
|
long |
max() |
long |
mean() |
long |
min() |
long |
percentile(double percentile) |
String |
toString() |
public EstimatedHistogram()
public EstimatedHistogram(int bucketCount)
public EstimatedHistogram(long[] offsets, long[] bucketData)
public long[] getBucketOffsets()
public void add(long n)
n
- public long[] getBuckets(boolean reset)
reset
- zero out buckets afterwards if truepublic long min()
public long max()
public long percentile(double percentile)
percentile
- public long mean()
IllegalStateException
- if any values were greater than the largest bucket thresholdpublic long count()
public boolean isOverflowed()
public void log(org.slf4j.Logger log)
log
- Copyright © 2014–2017 Robert Stupp, Koeln, Germany, robert-stupp.de. All rights reserved.