Class SimpleRate
- java.lang.Object
-
- org.apache.kafka.common.metrics.stats.Rate
-
- org.apache.kafka.common.metrics.stats.SimpleRate
-
- All Implemented Interfaces:
Measurable
,MeasurableStat
,MetricValueProvider<Double>
,Stat
public class SimpleRate extends Rate
A simple rate the rate is incrementally calculated based on the elapsed time between the earliest reading and now. An exception is made for the first window, which is considered of fixed size. This avoids the issue of an artificially high rate when the gap between readings is close to 0.
-
-
Constructor Summary
Constructors Constructor Description SimpleRate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
windowSize(MetricConfig config, long now)
-
-
-
Method Detail
-
windowSize
public long windowSize(MetricConfig config, long now)
- Overrides:
windowSize
in classRate
-
-