Records a monotonically increasing value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.metrics.api.Meter
Meter.BaseUnits, Meter.Id, Meter.Scope, Meter.Type
-
Method Summary
Modifier and TypeMethodDescriptionstatic Counter.Builder
Creates a new builder for a counter.long
count()
Returns the cumulative count since this counter was registered.void
Updates the counter by one.void
increment
(long amount) Updates the counter by the specified amount which should be non-negative.
-
Method Details
-
builder
Creates a new builder for a counter.- Parameters:
name
- counter name- Returns:
- new builder
-
increment
void increment()Updates the counter by one. -
increment
void increment(long amount) Updates the counter by the specified amount which should be non-negative.- Parameters:
amount
- amount to add to the counter.
-
count
long count()Returns the cumulative count since this counter was registered.- Returns:
- cumulative count since this counter was registered
-