Class Metric<T>

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    ApproxPercentileMetric, ScalarMetric

    @Stable
    public abstract class Metric<T>
    extends java.lang.Object
    implements java.io.Serializable
    A single metric. A single metric might be a single number or a vector of numbers (e.g. say percentile statistics).
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Metric​(java.lang.String group, java.lang.String name)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void decrement()
      Decrement metric by one.
      abstract T getValue()
      Retrieve current value of the metric.
      void increment()
      Increment the metric by one.
      abstract void increment​(double increment)
      Increment the metric by given double value.
      abstract void reset()
      Reset the metric to initial state.
      • Methods inherited from class java.lang.Object

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

      • Metric

        @ConstructorProperties({"group","name"})
        public Metric​(java.lang.String group,
                      java.lang.String name)
    • Method Detail

      • increment

        public void increment()
        Increment the metric by one.
      • increment

        public abstract void increment​(double increment)
        Increment the metric by given double value.
        Parameters:
        increment - the value to increment the metric by
      • decrement

        public void decrement()
        Decrement metric by one.
      • getValue

        public abstract T getValue()
        Retrieve current value of the metric.
        Returns:
        current value
      • reset

        public abstract void reset()
        Reset the metric to initial state.