Package io.micrometer.core.instrument
Interface FunctionCounter
-
- All Superinterfaces:
Meter
- All Known Implementing Classes:
CompositeFunctionCounter
,CumulativeFunctionCounter
,DropwizardFunctionCounter
,NoopFunctionCounter
,StepFunctionCounter
public interface FunctionCounter extends Meter
A counter that tracks a monotonically increasing function.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
FunctionCounter.Builder<T>
Fluent builder for function counters.-
Nested classes/interfaces inherited from interface io.micrometer.core.instrument.Meter
Meter.Id, Meter.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static <T> FunctionCounter.Builder<T>
builder(java.lang.String name, T obj, java.util.function.ToDoubleFunction<T> f)
double
count()
default java.lang.Iterable<Measurement>
measure()
Get a set of measurements.
-
-
-
Method Detail
-
builder
static <T> FunctionCounter.Builder<T> builder(java.lang.String name, @Nullable T obj, java.util.function.ToDoubleFunction<T> f)
-
count
double count()
- Returns:
- The cumulative count since this counter was created.
-
measure
default java.lang.Iterable<Measurement> measure()
Description copied from interface:Meter
Get a set of measurements. Should always return the same number of measurements and in the same order, regardless of the level of activity or the lack thereof.
-
-