public class DefaultLongTaskTimer extends AbstractMeter implements LongTaskTimer
LongTaskTimer.Builder, LongTaskTimer.Sample
Meter.Id, Meter.Type
Constructor and Description |
---|
DefaultLongTaskTimer(Meter.Id id,
Clock clock)
Deprecated.
|
DefaultLongTaskTimer(Meter.Id id,
Clock clock,
java.util.concurrent.TimeUnit baseTimeUnit,
DistributionStatisticConfig distributionStatisticConfig,
boolean supportsAggregablePercentiles)
Create a
DefaultLongTaskTimer instance. |
Modifier and Type | Method and Description |
---|---|
int |
activeTasks() |
java.util.concurrent.TimeUnit |
baseTimeUnit() |
double |
duration(java.util.concurrent.TimeUnit unit) |
boolean |
equals(java.lang.Object o) |
protected void |
forEachActive(java.util.function.Consumer<LongTaskTimer.Sample> sample) |
int |
hashCode() |
double |
max(java.util.concurrent.TimeUnit unit)
The amount of time the longest running task has been running
|
LongTaskTimer.Sample |
start()
Start keeping time for a task.
|
HistogramSnapshot |
takeSnapshot()
Summary statistics should be published off of a single snapshot instance so that, for example, there isn't
disagreement between the distribution's bucket counts because more events continue to stream in.
|
getId
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
builder, builder, duration, mean, measure, record, record, record, recordCallable, stop
takeSnapshot
@Deprecated public DefaultLongTaskTimer(Meter.Id id, Clock clock)
DefaultLongTaskTimer(Meter.Id, Clock, TimeUnit, DistributionStatisticConfig, boolean)
instead.DefaultLongTaskTimer
instance.id
- IDclock
- clockpublic DefaultLongTaskTimer(Meter.Id id, Clock clock, java.util.concurrent.TimeUnit baseTimeUnit, DistributionStatisticConfig distributionStatisticConfig, boolean supportsAggregablePercentiles)
DefaultLongTaskTimer
instance.id
- IDclock
- clockbaseTimeUnit
- base time unitdistributionStatisticConfig
- distribution statistic configurationsupportsAggregablePercentiles
- whether it supports aggregable percentilespublic LongTaskTimer.Sample start()
LongTaskTimer
start
in interface LongTaskTimer
public double duration(java.util.concurrent.TimeUnit unit)
duration
in interface LongTaskTimer
unit
- The time unit to scale the duration to.public double max(java.util.concurrent.TimeUnit unit)
LongTaskTimer
max
in interface LongTaskTimer
unit
- The time unit to scale the max to.public int activeTasks()
activeTasks
in interface LongTaskTimer
protected void forEachActive(java.util.function.Consumer<LongTaskTimer.Sample> sample)
public java.util.concurrent.TimeUnit baseTimeUnit()
baseTimeUnit
in interface LongTaskTimer
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public HistogramSnapshot takeSnapshot()
HistogramSupport
takeSnapshot
in interface HistogramSupport