public class CumulativeFunctionTimer<T> extends Object implements FunctionTimer
FunctionTimer.Builder<T>
Meter.Id, Meter.Type
Constructor and Description |
---|
CumulativeFunctionTimer(Meter.Id id,
T obj,
ToLongFunction<T> countFunction,
ToDoubleFunction<T> totalTimeFunction,
TimeUnit totalTimeFunctionUnit,
TimeUnit baseTimeUnit) |
Modifier and Type | Method and Description |
---|---|
TimeUnit |
baseTimeUnit() |
double |
count()
The total number of occurrences of the timed event.
|
Meter.Id |
getId() |
double |
totalTime(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, wait
builder, mean, measure
public CumulativeFunctionTimer(Meter.Id id, T obj, ToLongFunction<T> countFunction, ToDoubleFunction<T> totalTimeFunction, TimeUnit totalTimeFunctionUnit, TimeUnit baseTimeUnit)
public double count()
count
in interface FunctionTimer
public double totalTime(TimeUnit unit)
totalTime
in interface FunctionTimer
unit
- The base unit of time to scale the total to.public Meter.Id getId()
public TimeUnit baseTimeUnit()
baseTimeUnit
in interface FunctionTimer
public Meter.Type type()
Copyright © 2018. All rights reserved.