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, waitbuilder, mean, measurepublic CumulativeFunctionTimer(Meter.Id id, T obj, ToLongFunction<T> countFunction, ToDoubleFunction<T> totalTimeFunction, TimeUnit totalTimeFunctionUnit, TimeUnit baseTimeUnit)
public double count()
count in interface FunctionTimerpublic double totalTime(TimeUnit unit)
totalTime in interface FunctionTimerunit - The base unit of time to scale the total to.public Meter.Id getId()
public TimeUnit baseTimeUnit()
baseTimeUnit in interface FunctionTimerpublic Meter.Type type()
Copyright © 2020 LeanCloud. All rights reserved.