@Public @Evolving public class MutableRates extends MutableMetric
MutableRatesWithAggregation is preferable in that
situation.| Modifier and Type | Method | Description |
|---|---|---|
void |
add(java.lang.String name,
long elapsed) |
Add a rate sample for a rate metric
|
void |
init(java.lang.Class<?> protocol) |
Initialize the registry with all the methods in a protocol
so they all show up in the first snapshot.
|
void |
snapshot(MetricsRecordBuilder rb,
boolean all) |
Get a snapshot of the metric
|
changed, clearChanged, setChanged, snapshotpublic void init(java.lang.Class<?> protocol)
protocol - the protocol classpublic void add(java.lang.String name,
long elapsed)
name - of the rate metricelapsed - timepublic void snapshot(MetricsRecordBuilder rb, boolean all)
MutableMetricsnapshot in class MutableMetricrb - the metrics record builderall - if true, snapshot unchanged metrics as wellCopyright © 2008–2025 Apache Software Foundation. All rights reserved.