Class AvgMinMaxPercentileCounter

  • All Implemented Interfaces:
    Summary

    public class AvgMinMaxPercentileCounter
    extends Metric
    implements Summary
    Generic long counter that keep track of min/max/avg/percentiles. The counter is thread-safe
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(long value)
      Register a value.
      void addDataPoint​(long value)  
      void reset()  
      void resetMax()  
      java.util.Map<java.lang.String,​java.lang.Object> values()  
      • Methods inherited from class org.apache.zookeeper.server.metric.Metric

        add, add
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AvgMinMaxPercentileCounter

        public AvgMinMaxPercentileCounter​(java.lang.String name)
    • Method Detail

      • addDataPoint

        public void addDataPoint​(long value)
      • resetMax

        public void resetMax()
      • reset

        public void reset()
        Overrides:
        reset in class Metric
      • add

        public void add​(long value)
        Description copied from interface: Summary
        Register a value.

        This method is thread safe, The MetricsProvider will take care of synchronization.

        Specified by:
        add in interface Summary
        Overrides:
        add in class Metric
        Parameters:
        value - current value
      • values

        public java.util.Map<java.lang.String,​java.lang.Object> values()
        Specified by:
        values in class Metric