Class HistogramStatistic.Histogram

java.lang.Object
com.arpnetworking.metrics.mad.model.statistics.HistogramStatistic.Histogram
Enclosing class:
HistogramStatistic

public static final class HistogramStatistic.Histogram extends Object
A simple histogram implementation.
  • 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 this HistogramStatistic.Histogram was declared with!
      Parameters:
      packed - The packed bucket key.
      count - The number of entries at this value.
    • add

      public void add(HistogramStatistic.HistogramSnapshot histogramSnapshot)
      Adds a histogram snapshot to this one.
      Parameters:
      histogramSnapshot - The histogram snapshot to add to this one.
    • getSnapshot