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
Modifier and Type Method Description void
record(MetricConfig config, double value, long timeMs)
Record the given valueList<CompoundStat.NamedMeasurable>
stats()
String
toString()
-
Constructor Details
-
Meter
Construct a Meter with seconds as time unit -
Meter
Construct a Meter with provided time unit -
Meter
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 Details
-
stats
- Specified by:
stats
in interfaceCompoundStat
-
record
Description copied from interface:Stat
Record the given value -
toString
-