Class DefaultLatencyHistogramStatistic

java.lang.Object
org.terracotta.statistics.derived.latency.DefaultLatencyHistogramStatistic
All Implemented Interfaces:
LatencyHistogramQuery, LatencyHistogramStatistic, ChainedEventObserver, ChainedObserver

public class DefaultLatencyHistogramStatistic extends Object implements LatencyHistogramStatistic, ChainedEventObserver
  • Field Details

  • Constructor Details

    • DefaultLatencyHistogramStatistic

      public DefaultLatencyHistogramStatistic(double phi, int bucketCount, Duration window, LongSupplier timeSupplier)
      Create a histogram maintained over a sliding time window.

      The constructed histogram is:

      • maintained over window sliding window
      • consists of bucketCount buckets
      • where b1.size() ~= b0.size * phi
      If "phi" is high, the quantile bounds will be more precise for lower percentiles such as minimum. If "phi" is low, the quantile bounds will be more precise for higher percentiles such as 99%-ile, maximum.
      Parameters:
      phi - histogram bucket bias factor
      bucketCount - number of buckets
      window - sliding window size, in ns
      timeSupplier - the supplier of time, which must be in the same unit as the time passed to the {event(long, long)} method.
    • DefaultLatencyHistogramStatistic

      public DefaultLatencyHistogramStatistic(double phi, int bucketCount, Duration window)
  • Method Details