Timer.Builder, Timer.Sample
Meter.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.
|
getId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public NoopTimer(Meter.Id id)
public void record(long amount, java.util.concurrent.TimeUnit unit)
Timer
public <T> T record(java.util.function.Supplier<T> f)
Timer
public <T> T recordCallable(java.util.concurrent.Callable<T> f) throws java.lang.Exception
Timer
recordCallable
in interface Timer
f
- Function to execute and measure the execution time.java.lang.Exception
public void record(java.lang.Runnable f)
Timer
public long count()
Timer
public double totalTime(java.util.concurrent.TimeUnit unit)
Timer
public double max(java.util.concurrent.TimeUnit unit)
Timer
public double percentile(double percentile, java.util.concurrent.TimeUnit unit)
Timer
percentile
in interface Timer
public double histogramCountAtValue(long valueNanos)
histogramCountAtValue
in interface Timer
public java.util.concurrent.TimeUnit baseTimeUnit()
baseTimeUnit
in interface Timer
public HistogramSnapshot takeSnapshot(boolean supportsAggregablePercentiles)
takeSnapshot
in interface Timer