Class HistogramStatistic.Histogram
java.lang.Object
com.arpnetworking.metrics.mad.model.statistics.HistogramStatistic.Histogram
- Enclosing class:
- HistogramStatistic
A simple histogram implementation.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(HistogramStatistic.HistogramSnapshot histogramSnapshot) Adds a histogram snapshot to this one.void
recordPacked
(long packed, long count) Records a packed value into the histogram.void
recordValue
(double value) Records a value into the histogram.void
recordValue
(double value, long count) Records a value into the histogram.
-
Constructor Details
-
Histogram
public Histogram()Public constructor. -
Histogram
public Histogram(int precision) Public constructor.- Parameters:
precision
- the bits of mantissa precision in the bucket key
-
-
Method Details
-
recordValue
public void recordValue(double value, long count) Records a value into the histogram.- Parameters:
value
- The value of the entry.count
- The number of entries at this value.
-
recordValue
public void recordValue(double value) Records a value into the histogram.- Parameters:
value
- The value of the entry.
-
recordPacked
public void recordPacked(long packed, long count) Records a packed value into the histogram. The packed values must be at the precision that thisHistogramStatistic.Histogram
was declared with!- Parameters:
packed
- The packed bucket key.count
- The number of entries at this value.
-
add
Adds a histogram snapshot to this one.- Parameters:
histogramSnapshot
- The histogram snapshot to add to this one.
-
getSnapshot
-