Class LongAdderRateGauge

  • All Implemented Interfaces:
    io.tehuti.metrics.Measurable, io.tehuti.metrics.MeasurableStat, io.tehuti.metrics.Stat

    public class LongAdderRateGauge
    extends io.tehuti.metrics.stats.Gauge
    This metric class is to optimize for high write throughput, low read throughput measurement use case instead of real-time measurement. The smallest measurement interval is 30 seconds.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getRate()  
      double measure​(io.tehuti.metrics.MetricConfig config, long currentTimeMs)  
      void record()  
      void record​(long amount)  
      • Methods inherited from class io.tehuti.metrics.stats.Gauge

        record
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.tehuti.metrics.Measurable

        measureWithExtraValue
    • Field Detail

      • RATE_GAUGE_CACHE_DURATION_IN_SECONDS

        public static final int RATE_GAUGE_CACHE_DURATION_IN_SECONDS
        See Also:
        Constant Field Values
    • Constructor Detail

      • LongAdderRateGauge

        public LongAdderRateGauge()
      • LongAdderRateGauge

        public LongAdderRateGauge​(Time time)
    • Method Detail

      • record

        public void record()
      • record

        public void record​(long amount)
      • measure

        public double measure​(io.tehuti.metrics.MetricConfig config,
                              long currentTimeMs)
        Specified by:
        measure in interface io.tehuti.metrics.Measurable
        Overrides:
        measure in class io.tehuti.metrics.stats.Gauge
      • getRate

        public double getRate()