public class CompositeLongTaskTimer extends AbstractMeter implements LongTaskTimer, CompositeMeter
LongTaskTimer.BuilderMeter.Type| Modifier and Type | Method and Description |
|---|---|
int |
activeTasks()
Returns the current number of tasks being executed.
|
void |
add(MeterRegistry registry) |
long |
duration()
Returns the cumulative duration of all current tasks in nanoseconds.
|
long |
duration(long task)
Returns the current duration for an active task.
|
void |
remove(MeterRegistry registry) |
long |
start()
Start keeping time for a task.
|
long |
stop(long task)
Mark a given task as completed.
|
getDescription, getName, getTagsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetType, measure, record, record, record, recordCallablegetDescription, getName, getTagspublic 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 void add(MeterRegistry registry)
add in interface CompositeMeterpublic void remove(MeterRegistry registry)
remove in interface CompositeMeter