public class NoopLongTaskTimer extends NoopMeter implements LongTaskTimer
LongTaskTimer.BuilderMeter.Id, Meter.Type| Modifier and Type | Field and Description |
|---|---|
static NoopLongTaskTimer |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
int |
activeTasks()
Returns the current number of tasks being executed.
|
double |
duration(long task,
java.util.concurrent.TimeUnit unit)
Returns the current duration for an active task.
|
double |
duration(java.util.concurrent.TimeUnit unit)
Returns the cumulative duration of all current tasks in nanoseconds.
|
long |
start()
Start keeping time for a task.
|
long |
stop(long task)
Mark a given task as completed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuilder, getType, measure, record, record, record, recordCallablepublic static NoopLongTaskTimer INSTANCE
public long start()
LongTaskTimerstart in interface LongTaskTimerpublic long stop(long task)
LongTaskTimerstop in interface LongTaskTimertask - Id for the task to stop. This should be the value returned from LongTaskTimer.start().public double duration(long task,
java.util.concurrent.TimeUnit unit)
LongTaskTimerduration in interface LongTaskTimertask - Id for the task to stop. This should be the value returned from LongTaskTimer.start().unit - The time unit to scale the returned value to.public double duration(java.util.concurrent.TimeUnit unit)
LongTaskTimerduration in interface LongTaskTimerpublic int activeTasks()
LongTaskTimeractiveTasks in interface LongTaskTimer