public static final class DropwizardTypes.DescribableTimer extends com.codahale.metrics.Timer implements DropwizardTypes.DescribableMetric, Timer
com.codahale.metrics.Timer.Context
Timer.Builder, Timer.Sample
Meter.Id, Meter.Type
Modifier and Type | Method and Description |
---|---|
TimeUnit |
baseTimeUnit() |
long |
count()
The number of times that stop has been called on this timer.
|
Meter.Id |
getId()
Returns A unique combination of name and tags identifying this metric.
|
double |
histogramCountAtValue(long valueNanos) |
double |
max(TimeUnit unit)
The maximum time of a single event.
|
double |
percentile(double percentile,
TimeUnit unit)
The latency at a specific percentile.
|
void |
record(long amount,
TimeUnit unit)
Updates the statistics kept by the counter with the specified amount.
|
void |
record(Runnable f)
Executes the runnable `f` and records the time taken.
|
<T> T |
record(Supplier<T> f)
Executes the Supplier `f` and records the time taken.
|
<T> T |
recordCallable(Callable<T> f)
Executes the callable `f` and records the time taken.
|
HistogramSnapshot |
takeSnapshot(boolean supportsAggregablePercentiles) |
String |
toString() |
double |
totalTime(TimeUnit unit)
The total time of recorded events.
|
getCount, getFifteenMinuteRate, getFiveMinuteRate, getMeanRate, getOneMinuteRate, getSnapshot, time, time, time, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Meter.Id getId()
DropwizardTypes.DescribableMetric
getId
in interface Meter
getId
in interface DropwizardTypes.DescribableMetric
public void record(long amount, TimeUnit unit)
Timer
public <T> T record(Supplier<T> f)
Timer
public <T> T recordCallable(Callable<T> f) throws Exception
Timer
recordCallable
in interface Timer
f
- Function to execute and measure the execution time.Exception
public void record(Runnable f)
Timer
public long count()
Timer
public double totalTime(TimeUnit unit)
Timer
public double max(TimeUnit unit)
Timer
public double percentile(double percentile, TimeUnit unit)
Timer
percentile
in interface Timer
public double histogramCountAtValue(long valueNanos)
histogramCountAtValue
in interface Timer
public HistogramSnapshot takeSnapshot(boolean supportsAggregablePercentiles)
takeSnapshot
in interface Timer
public TimeUnit baseTimeUnit()
baseTimeUnit
in interface Timer
Copyright 2011-2017 ForgeRock AS.