public class NoopLongTaskTimer extends NoopMeter implements LongTaskTimer
LongTaskTimer.Builder, LongTaskTimer.Sample
Meter.Id, Meter.Type
Constructor and Description |
---|
NoopLongTaskTimer(Meter.Id id) |
Modifier and Type | Method and Description |
---|---|
int |
activeTasks() |
double |
duration(long task,
java.util.concurrent.TimeUnit unit)
The current duration for an active task.
|
double |
duration(java.util.concurrent.TimeUnit unit) |
LongTaskTimer.Sample |
start()
Start keeping time for a task.
|
long |
stop(long task)
Mark a given task as completed.
|
getId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
builder, builder, measure, record, record, record, recordCallable
public NoopLongTaskTimer(Meter.Id id)
public LongTaskTimer.Sample 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 double duration(long task, java.util.concurrent.TimeUnit unit)
LongTaskTimer
duration
in interface LongTaskTimer
task
- Id for the task to stop. This should be the value returned from LongTaskTimer.start()
.unit
- The time unit to scale the duration to.public double duration(java.util.concurrent.TimeUnit unit)
duration
in interface LongTaskTimer
unit
- The time unit to scale the duration to.public int activeTasks()
activeTasks
in interface LongTaskTimer