Class Meter
- java.lang.Object
-
- org.apache.kafka.common.metrics.stats.Meter
-
- All Implemented Interfaces:
CompoundStat
,Stat
public class Meter extends Object implements CompoundStat
A compound stat that includes a rate metric and a cumulative total metric.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.kafka.common.metrics.CompoundStat
CompoundStat.NamedMeasurable
-
-
Constructor Summary
Constructors Constructor Description Meter(TimeUnit unit, MetricName rateMetricName, MetricName totalMetricName)
Construct a Meter with provided time unitMeter(TimeUnit unit, SampledStat rateStat, MetricName rateMetricName, MetricName totalMetricName)
Construct a Meter with provided time unitMeter(MetricName rateMetricName, MetricName totalMetricName)
Construct a Meter with seconds as time unitMeter(SampledStat rateStat, MetricName rateMetricName, MetricName totalMetricName)
Construct a Meter with seconds as time unit
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
record(MetricConfig config, double value, long timeMs)
Record the given valueList<CompoundStat.NamedMeasurable>
stats()
-
-
-
Constructor Detail
-
Meter
public Meter(MetricName rateMetricName, MetricName totalMetricName)
Construct a Meter with seconds as time unit
-
Meter
public Meter(TimeUnit unit, MetricName rateMetricName, MetricName totalMetricName)
Construct a Meter with provided time unit
-
Meter
public Meter(SampledStat rateStat, MetricName rateMetricName, MetricName totalMetricName)
Construct a Meter with seconds as time unit
-
Meter
public Meter(TimeUnit unit, SampledStat rateStat, MetricName rateMetricName, MetricName totalMetricName)
Construct a Meter with provided time unit
-
-
Method Detail
-
stats
public List<CompoundStat.NamedMeasurable> stats()
- Specified by:
stats
in interfaceCompoundStat
-
record
public void record(MetricConfig config, double value, long timeMs)
Description copied from interface:Stat
Record the given value
-
-