public interface FunctionTimer extends Meter
Modifier and Type | Interface and Description |
---|---|
static class |
FunctionTimer.Builder<T>
Fluent builder for function timer.
|
Meter.Id, Meter.Type
Modifier and Type | Method and Description |
---|---|
TimeUnit |
baseTimeUnit() |
static <T> FunctionTimer.Builder<T> |
builder(String name,
T obj,
ToLongFunction<T> countFunction,
ToDoubleFunction<T> totalTimeFunction,
TimeUnit totalTimeFunctionUnit) |
double |
count() |
default double |
mean(TimeUnit unit) |
default Iterable<Measurement> |
measure()
Get a set of measurements.
|
double |
totalTime(TimeUnit unit) |
static <T> FunctionTimer.Builder<T> builder(String name, T obj, ToLongFunction<T> countFunction, ToDoubleFunction<T> totalTimeFunction, TimeUnit totalTimeFunctionUnit)
double count()
double totalTime(TimeUnit unit)
unit
- The base unit of time to scale the total to.default double mean(TimeUnit unit)
unit
- The base unit of time to scale the mean to.TimeUnit baseTimeUnit()
default Iterable<Measurement> measure()
Meter
Copyright © 2019. All rights reserved.