Interface StatsMeter

All Superinterfaces:
IpdMeter
All Known Implementing Classes:
StatsMeter.Noop

public interface StatsMeter extends IpdMeter
Interface representing a statistics meter, which is a type of IpdMeter. A statistics meter can be updated with a single long value, which is used to calculate historical statistics.

This meter will calculate mean, min, max, p50, p90, p99 and more. All statistics are calculated only for recent values (e.g. from last 5-10 minutes) and can't be relied on for calculating statistics of all meters updates.

Since:
3.0.0
  • Field Details

  • Method Details

    • getTypeId

      default String getTypeId()
      Description copied from interface: IpdMeter
      Identifies type of the meter.
      Specified by:
      getTypeId in interface IpdMeter
      Returns:
      Type ID of the meter
    • update

      default void update(long value)
      Updates the metric with the given value. The time unit of the value is milliseconds.
      Parameters:
      value - value for updated statistics
    • update

      void update(long value, TimeUnit timeUnit)
      Updates the metric with the given value. You may specify the time unit of the value.
      Parameters:
      value - value for updated statistics
      timeUnit - time unit of the value