Interface Histogram
-
- All Known Implementing Classes:
BarSplittingBiasedHistogram,StripedHistogram
public interface HistogramA histogram supporting double values
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceHistogram.BucketA histogram bucket.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidevent(double value, long time)voidexpire(long time)java.util.List<Histogram.Bucket>getBuckets()Returns the histograms bucketsdefault doublegetMaximum()The maximum value.default doublegetMinimum()The minimum value.double[]getQuantileBounds(double quantile)Returns the bounds[minimum, maximum)on the given quantile.longsize()
-
-
-
Method Detail
-
getBuckets
java.util.List<Histogram.Bucket> getBuckets()
Returns the histograms buckets- Returns:
- the histogram buckets
-
getMinimum
default double getMinimum()
The minimum value.This is equal to the inclusive lower bound of the zeroth (0.0) quantile.
- Returns:
- the minimum value
-
getMaximum
default double getMaximum()
The maximum value.This is equal to highest double value strictly less than the exclusive upper bound of the last (1.0) quantile.
- Returns:
- the maximum value
-
getQuantileBounds
double[] getQuantileBounds(double quantile) throws java.lang.IllegalArgumentExceptionReturns the bounds[minimum, maximum)on the given quantile.- Parameters:
quantile- desired quantile- Returns:
- the quantile bounds
- Throws:
java.lang.IllegalArgumentException- ifquantileif outside the range [0.0..1.0]
-
size
long size()
- Returns:
- the number of elements in the histogram
-
event
void event(double value, long time)
-
expire
void expire(long time)
-
-