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.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SimpleRate()
-
Method Summary
Modifier and Type Method Description long
windowSize(MetricConfig config, long now)
-
Constructor Details
-
SimpleRate
public SimpleRate()
-
-
Method Details
-
windowSize
- Overrides:
windowSize
in classRate
-