F1
- type of the field.public abstract class Counter1<F1> extends Object implements com.google.gerrit.extensions.registration.RegistrationHandle
Suitable uses are "total requests handled", "bytes sent", etc.
Use Description.setRate()
to suggest the monitoring system
should also track the rate of increments if this is of interest.
For an instantaneous read of a value that can change over time
(e.g. "memory in use") use a CallbackMetric
.
Constructor and Description |
---|
Counter1() |
Modifier and Type | Method and Description |
---|---|
void |
increment(F1 field1)
Increment the counter by one event.
|
abstract void |
incrementBy(F1 field1,
long value)
Increment the counter by a specified amount.
|
public void increment(F1 field1)
field1
- bucket to increment.public abstract void incrementBy(F1 field1, long value)
field1
- bucket to increment.value
- value to increment by, must be >= 0.