public class SimpleLongTaskTimer extends AbstractSimpleMeter implements LongTaskTimer
Meter.Typeid| Constructor and Description |
|---|
SimpleLongTaskTimer(MeterId id,
Clock clock) |
| Modifier and Type | Method and Description |
|---|---|
int |
activeTasks()
Returns the current number of tasks being executed.
|
long |
duration()
Returns the cumulative duration of all current tasks in nanoseconds.
|
long |
duration(long task)
Returns the current duration for an active task.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.util.List<Measurement> |
measure()
Get the set of measurements for this meter.
|
long |
start()
Start keeping time for a task.
|
long |
stop(long task)
Mark a given task as completed.
|
getName, getTagsclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetType, record, record, record, recordCallablepublic 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 long duration(long task)
LongTaskTimerduration in interface LongTaskTimertask - Id for the task to stop. This should be the value returned from LongTaskTimer.start().public long duration()
LongTaskTimerduration in interface LongTaskTimerpublic int activeTasks()
LongTaskTimeractiveTasks in interface LongTaskTimerpublic java.util.List<Measurement> measure()
Meterpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object