public class PrometheusLongTaskTimer extends java.lang.Object implements LongTaskTimer
Meter.Type
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.
|
java.lang.String |
getName() |
java.lang.Iterable<Tag> |
getTags() |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType, record, record, record, recordCallable
public long start()
LongTaskTimer
start
in interface LongTaskTimer
public long stop(long task)
LongTaskTimer
stop
in interface LongTaskTimer
task
- Id for the task to stop. This should be the value returned from LongTaskTimer.start()
.public long duration(long task)
LongTaskTimer
duration
in interface LongTaskTimer
task
- Id for the task to stop. This should be the value returned from LongTaskTimer.start()
.public long duration()
LongTaskTimer
duration
in interface LongTaskTimer
public int activeTasks()
LongTaskTimer
activeTasks
in interface LongTaskTimer
public java.util.List<Measurement> measure()
Meter