Class LatencyStatAndMetric

  • All Implemented Interfaces:
    IMetric<Double>

    public class LatencyStatAndMetric
    extends Object
    implements IMetric<Double>
    Acts as a Latency Metric, but also keeps track of approximate latency for the last 10 mins, 3 hours, 1 day, and all time.
    • Constructor Detail

      • LatencyStatAndMetric

        public LatencyStatAndMetric​(int numBuckets)
        Constructor
        Parameters:
        numBuckets - the number of buckets to divide the time periods into.
    • Method Detail

      • record

        public void record​(long latency)
        Record a specific latency
        Parameters:
        latency - what we are recording
      • getTimeLatAvg

        public Map<String,​Double> getTimeLatAvg()
        Get time latency average
        Returns:
        a map of time window to average latency. Keys are "600" for last 10 mins "10800" for the last 3 hours "86400" for the last day ":all-time" for all time
      • close

        public void close()