Class LatencyMetrics


  • public class LatencyMetrics
    extends Object
    Metrics on the time interval associated with e.g. the acquiring of a lock.

    In the language of LatencyStats, these metrics relate to time intervals associated with e.g. the acquiring of a lock, collected over time period.

    Author:
    hakon
    See Also:
    LatencyStats
    • Constructor Summary

      Constructors 
      Constructor Description
      LatencyMetrics​(Duration latency, Duration maxLatency, Duration maxActiveLatency, double startHz, double endHz, double load, int maxLoad, int currentLoad)  
    • Constructor Detail

      • LatencyMetrics

        public LatencyMetrics​(Duration latency,
                              Duration maxLatency,
                              Duration maxActiveLatency,
                              double startHz,
                              double endHz,
                              double load,
                              int maxLoad,
                              int currentLoad)
    • Method Detail

      • latencySeconds

        public double latencySeconds()
        Returns the average latency of all intervals that ended in the period.
      • maxLatencySeconds

        public double maxLatencySeconds()
        Returns the maximum latency of any interval that ended in the period.
      • maxActiveLatencySeconds

        public double maxActiveLatencySeconds()
        Return the maximum latency of any interval that ended in the period, or is still active.
      • startHz

        public double startHz()
        Returns the average number of intervals that started in the period per second.
      • endHz

        public double endHz()
        Returns the average number of intervals that ended in the period per second.
      • load

        public double load()
        The average load of the implied time period, with 3 decimal places precision.
      • maxLoad

        public int maxLoad()
        Returns the maximum number of concurrently active intervals in the period.
      • currentLoad

        public int currentLoad()
        Returns the number of active intervals right now.