All Implemented Interfaces:
Measurable, MeasurableStat, MetricValueProvider<Double>, Stat

public class Value extends Object implements MeasurableStat
An instantaneous value.
  • Constructor Details

    • Value

      public Value()
  • Method Details

    • measure

      public double measure(MetricConfig config, long now)
      Description copied from interface: Measurable
      Measure this quantity and return the result as a double
      Specified by:
      measure in interface Measurable
      config - The configuration for this metric
      now - The POSIX time in milliseconds the measurement is being taken
      The measured value
    • record

      public void record(MetricConfig config, double value, long timeMs)
      Description copied from interface: Stat
      Record the given value
      Specified by:
      record in interface Stat
      config - The configuration to use for this metric
      value - The value to record
      timeMs - The POSIX time in milliseconds this value occurred