public class StepFunctionTimer<T> extends java.lang.Object implements FunctionTimer
FunctionTimer.Builder<T>Meter.Id, Meter.Type| Constructor and Description |
|---|
StepFunctionTimer(Meter.Id id,
Clock clock,
long stepMillis,
T obj,
java.util.function.ToLongFunction<T> countFunction,
java.util.function.ToDoubleFunction<T> totalTimeFunction,
java.util.concurrent.TimeUnit totalTimeFunctionUnits,
java.util.concurrent.TimeUnit baseTimeUnit) |
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.TimeUnit |
baseTimeUnit() |
double |
count()
The total number of occurrences of the timed event.
|
Meter.Id |
getId() |
double |
totalTime(java.util.concurrent.TimeUnit unit)
The total time of all occurrences of the timed event.
|
Meter.Type |
type() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuilder, mean, measurepublic StepFunctionTimer(Meter.Id id, Clock clock, long stepMillis, T obj, java.util.function.ToLongFunction<T> countFunction, java.util.function.ToDoubleFunction<T> totalTimeFunction, java.util.concurrent.TimeUnit totalTimeFunctionUnits, java.util.concurrent.TimeUnit baseTimeUnit)
public double count()
count in interface FunctionTimerpublic double totalTime(java.util.concurrent.TimeUnit unit)
totalTime in interface FunctionTimerpublic Meter.Id getId()
public java.util.concurrent.TimeUnit baseTimeUnit()
baseTimeUnit in interface FunctionTimerpublic Meter.Type type()