public interface Counter extends Meter
Gauge
.Modifier and Type | Interface and Description |
---|---|
static class |
Counter.Builder
Fluent builder for counters.
|
Meter.Id, Meter.Type
Modifier and Type | Method and Description |
---|---|
static Counter.Builder |
builder(java.lang.String name) |
double |
count() |
default void |
increment()
Update the counter by one.
|
void |
increment(double amount)
Update the counter by
amount . |
default java.lang.Iterable<Measurement> |
measure()
Get a set of measurements.
|
static Counter.Builder builder(java.lang.String name)
default void increment()
void increment(double amount)
amount
.amount
- Amount to add to the counter.double count()
default java.lang.Iterable<Measurement> measure()
Meter