Timer.Builder, Timer.SampleMeter.Id, Meter.Type| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.TimeUnit |
baseTimeUnit() |
long |
count()
The number of times that stop has been called on this timer.
|
double |
histogramCountAtValue(long valueNanos) |
double |
max(java.util.concurrent.TimeUnit unit)
The maximum time of a single event.
|
double |
percentile(double percentile,
java.util.concurrent.TimeUnit unit)
The latency at a specific percentile.
|
void |
record(long amount,
java.util.concurrent.TimeUnit unit)
Updates the statistics kept by the counter with the specified amount.
|
void |
record(java.lang.Runnable f)
Executes the runnable `f` and records the time taken.
|
<T> T |
record(java.util.function.Supplier<T> f)
Executes the Supplier `f` and records the time taken.
|
<T> T |
recordCallable(java.util.concurrent.Callable<T> f)
Executes the callable `f` and records the time taken.
|
HistogramSnapshot |
takeSnapshot(boolean supportsAggregablePercentiles) |
double |
totalTime(java.util.concurrent.TimeUnit unit)
The total time of recorded events.
|
getIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic NoopTimer(Meter.Id id)
public void record(long amount,
java.util.concurrent.TimeUnit unit)
Timerpublic <T> T record(java.util.function.Supplier<T> f)
Timerpublic <T> T recordCallable(java.util.concurrent.Callable<T> f)
throws java.lang.Exception
TimerrecordCallable in interface Timerf - Function to execute and measure the execution time.java.lang.Exceptionpublic void record(java.lang.Runnable f)
Timerpublic long count()
Timerpublic double totalTime(java.util.concurrent.TimeUnit unit)
Timerpublic double max(java.util.concurrent.TimeUnit unit)
Timerpublic double percentile(double percentile,
java.util.concurrent.TimeUnit unit)
Timerpercentile in interface Timerpublic double histogramCountAtValue(long valueNanos)
histogramCountAtValue in interface Timerpublic java.util.concurrent.TimeUnit baseTimeUnit()
baseTimeUnit in interface Timerpublic HistogramSnapshot takeSnapshot(boolean supportsAggregablePercentiles)
takeSnapshot in interface Timer