public class Histogram<T>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Histogram.Builder<T> |
static class |
Histogram.Type |
| Constructor and Description |
|---|
Histogram(BucketFunction<? extends T> f,
Histogram.Type type,
java.util.List<BucketListener<T>> listeners,
boolean percentiles) |
| Modifier and Type | Method and Description |
|---|---|
static Histogram.Builder<java.lang.Double> |
exponential(double start,
double exp,
int count) |
static Histogram.Builder<java.lang.Double> |
exponentialTime(java.util.concurrent.TimeUnit unit,
double start,
double exp,
int count) |
static <U> Histogram.Builder<U> |
function(BucketFunction<U> f) |
java.util.Collection<Bucket<T>> |
getBuckets() |
Histogram.Type |
getType() |
boolean |
isCumulative() |
boolean |
isPercentiles() |
static Histogram.Builder<java.lang.Double> |
linear(double start,
double width,
int count) |
static Histogram.Builder<java.lang.Double> |
linearTime(java.util.concurrent.TimeUnit unit,
double start,
double width,
int count) |
void |
observe(double value) |
static Histogram.Builder<java.lang.Double> |
percentiles() |
static Histogram.Builder<java.lang.Double> |
percentilesTime() |
public Histogram(BucketFunction<? extends T> f, Histogram.Type type, java.util.List<BucketListener<T>> listeners, boolean percentiles)
public boolean isCumulative()
public boolean isPercentiles()
public Histogram.Type getType()
public static <U> Histogram.Builder<U> function(BucketFunction<U> f)
public static Histogram.Builder<java.lang.Double> linear(double start, double width, int count)
start - Leftmost bucketwidth - The interval between nonZeroBucketscount - The total number of nonZeroBuckets, yielding count-1 intervals between thempublic static Histogram.Builder<java.lang.Double> linearTime(java.util.concurrent.TimeUnit unit, double start, double width, int count)
unit - The time unit of start.start - Leftmost bucketwidth - The interval between nonZeroBucketscount - The total number of nonZeroBuckets, yielding count-1 intervals between thempublic static Histogram.Builder<java.lang.Double> exponential(double start, double exp, int count)
start - Leftmost bucket is start*factorexp - The exponentcount - The total number of nonZeroBuckets, yielding count-1 intervals between thempublic static Histogram.Builder<java.lang.Double> exponentialTime(java.util.concurrent.TimeUnit unit, double start, double exp, int count)
unit - The time unit of start.start - Leftmost bucket is start*factorexp - The exponentcount - The total number of nonZeroBuckets, yielding count-1 intervals between thempublic static Histogram.Builder<java.lang.Double> percentiles()
public static Histogram.Builder<java.lang.Double> percentilesTime()
public void observe(double value)