Class WritePathLatencySensor


  • public class WritePathLatencySensor
    extends java.lang.Object
    This class serves as a latency sensor for write path that contains two types of stats: Avg and Max. Note that this latency sensor should only be used in to write path as read path latency evaluation will need more information than just max and average, e.g. 50/99 percentile numbers.
    • Constructor Summary

      Constructors 
      Constructor Description
      WritePathLatencySensor​(io.tehuti.metrics.MetricsRepository metricsRepo, io.tehuti.metrics.MetricConfig metricConfig, java.lang.String sensorName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getAvg()  
      double getMax()  
      void record​(double value, long currentTimeMs)
      Record the latency value.
      • Methods inherited from class java.lang.Object

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

      • WritePathLatencySensor

        public WritePathLatencySensor​(io.tehuti.metrics.MetricsRepository metricsRepo,
                                      io.tehuti.metrics.MetricConfig metricConfig,
                                      java.lang.String sensorName)
    • Method Detail

      • getAvg

        public double getAvg()
        Returns:
        Avg stats of this latency sensor in millisecond unit.
      • getMax

        public double getMax()
        Returns:
        Max stats of this latency sensor in millisecond unit.
      • record

        public void record​(double value,
                           long currentTimeMs)
        Record the latency value.