public class NoopTimer extends NoopMeter implements Timer
Timer.Builder, Timer.SampleMeter.Id, Meter.Type| Modifier and Type | Method and Description |
|---|---|
TimeUnit |
baseTimeUnit() |
long |
count() |
double |
max(TimeUnit unit) |
void |
record(long amount,
TimeUnit unit)
Updates the statistics kept by the timer 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()
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.
|
double |
totalTime(TimeUnit unit) |
getIdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuilder, builder, histogramCountAtValue, mean, measure, percentile, record, start, start, start, wrap, wrap, wraptakeSnapshotpublic NoopTimer(Meter.Id id)
public void record(long amount,
TimeUnit unit)
Timerpublic <T> T record(Supplier<T> f)
Timerf and records the time taken.public <T> T recordCallable(Callable<T> f) throws Exception
Timerf and records the time taken.recordCallable in interface TimerT - The return type of the Callable.f - Function to execute and measure the execution time.f.Exception - Any exception bubbling up from the callable.public void record(Runnable f)
Timerf and records the time taken.public long count()
public double totalTime(TimeUnit unit)
public double max(TimeUnit unit)
public TimeUnit baseTimeUnit()
baseTimeUnit in interface Timerpublic HistogramSnapshot takeSnapshot()
HistogramSupporttakeSnapshot in interface HistogramSupportCopyright © 2020 LeanCloud. All rights reserved.