org.apache.storm.metrics2

## Class RateCounter

- java.lang.Object
- - org.apache.storm.metrics2.RateCounter

- All Implemented Interfaces:
    com.codahale.metrics.Gauge<Double>, com.codahale.metrics.Metric

      public class RateCounter
      extends Object
      implements com.codahale.metrics.Gauge<Double>

  A Counter metric that also implements a Gauge to report the average rate of events per second over 1 minute. This class was added as a compromise to using a Meter, which has a much larger performance impact.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Double` | `getValue()` Reports the the average rate of events per second over 1 minute for the metric.
    `void` | `inc(long n)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getValue

          public Double getValue()

      Reports the the average rate of events per second over 1 minute for the metric.

      Specified by:
        `getValue` in interface `com.codahale.metrics.Gauge<Double>`
      Returns:
        the rate

    - #### inc

          public void inc(long n)

Copyright © 2021 The Apache Software Foundation. All rights reserved.