Search in sources :

Example 1 with StepFunctionTimer

use of io.micrometer.core.instrument.step.StepFunctionTimer in project micrometer by micrometer-metrics.

the class AtlasMeterRegistry method newFunctionTimer.

@Override
protected <T> FunctionTimer newFunctionTimer(Meter.Id id, T obj, ToLongFunction<T> countFunction, ToDoubleFunction<T> totalTimeFunction, TimeUnit totalTimeFunctionUnits) {
    FunctionTimer ft = new StepFunctionTimer<>(id, clock, atlasConfig.step().toMillis(), obj, countFunction, totalTimeFunction, totalTimeFunctionUnits, getBaseTimeUnit());
    newMeter(id, Meter.Type.TIMER, ft.measure());
    return ft;
}
Also used : StepFunctionTimer(io.micrometer.core.instrument.step.StepFunctionTimer) StepFunctionTimer(io.micrometer.core.instrument.step.StepFunctionTimer)

Aggregations

StepFunctionTimer (io.micrometer.core.instrument.step.StepFunctionTimer)1