public class EstimatedHistogram
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | EstimatedHistogram.EstimatedHistogramSerializer | 
| Modifier and Type | Field and Description | 
|---|---|
| static EstimatedHistogram.EstimatedHistogramSerializer | serializer | 
| Constructor and Description | 
|---|
| EstimatedHistogram() | 
| EstimatedHistogram(int bucketCount) | 
| EstimatedHistogram(int bucketCount,
                  boolean considerZeroes) | 
| EstimatedHistogram(long[] bucketData)Create EstimatedHistogram from only bucket data. | 
| 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(java.lang.Object o) | 
| long[] | getBucketOffsets() | 
| long[] | getBuckets(boolean reset) | 
| long | getLargestBucketOffset() | 
| int | hashCode() | 
| boolean | isOverflowed() | 
| void | log(org.slf4j.Logger log)log.debug() every record in the histogram | 
| long | max() | 
| long | mean() | 
| long | min() | 
| static long[] | newOffsets(int size,
          boolean considerZeroes) | 
| long | percentile(double percentile) | 
| double | rawMean() | 
public static final EstimatedHistogram.EstimatedHistogramSerializer serializer
public EstimatedHistogram()
public EstimatedHistogram(int bucketCount)
public EstimatedHistogram(int bucketCount,
                          boolean considerZeroes)
public EstimatedHistogram(long[] bucketData)
bucketData - bucket datapublic EstimatedHistogram(long[] offsets,
                          long[] bucketData)
public static long[] newOffsets(int size,
                                boolean considerZeroes)
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()
java.lang.IllegalStateException - if any values were greater than the largest bucket thresholdpublic double rawMean()
java.lang.IllegalStateException - if any values were greater than the largest bucket thresholdpublic long count()
public long getLargestBucketOffset()
public boolean isOverflowed()
public void log(org.slf4j.Logger log)
log - public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2018 The Apache Software Foundation