Class LatencyMetrics


  • public class LatencyMetrics
    extends java.lang.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​(java.time.Duration latency, java.time.Duration maxLatency, java.time.Duration maxActiveLatency, double startHz, double endHz, double load, int maxLoad, int currentLoad)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int currentLoad()
      Returns the number of active intervals right now.
      double endHz()
      Returns the average number of intervals that ended in the period per second.
      double latencySeconds()
      Returns the average latency of all intervals that ended in the period.
      double load()
      The average load of the implied time period, with 3 decimal places precision.
      double maxActiveLatencySeconds()
      Return the maximum latency of any interval that ended in the period, or is still active.
      double maxLatencySeconds()
      Returns the maximum latency of any interval that ended in the period.
      int maxLoad()
      Returns the maximum number of concurrently active intervals in the period.
      double startHz()
      Returns the average number of intervals that started in the period per second.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • LatencyMetrics

        public LatencyMetrics​(java.time.Duration latency,
                              java.time.Duration maxLatency,
                              java.time.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.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object