| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all recorded durations.
|
long |
count()
Returns the number of events which have been marked.
|
TimeUnit |
durationUnit()
Returns the timer's duration scale unit.
|
String |
eventType()
Returns the type of events the meter is measuring.
|
double |
fifteenMinuteRate()
Returns the fifteen-minute exponentially-weighted moving average rate at which events have
occurred since the meter was created.
|
double |
fiveMinuteRate()
Returns the five-minute exponentially-weighted moving average rate at which events have
occurred since the meter was created.
|
Snapshot |
getSnapshot()
Returns a snapshot of the values.
|
double |
max()
Returns the longest recorded duration.
|
double |
mean()
Returns the arithmetic mean of all recorded durations.
|
double |
meanRate()
Returns the mean rate at which events have occurred since the meter was created.
|
double |
min()
Returns the shortest recorded duration.
|
double |
oneMinuteRate()
Returns the one-minute exponentially-weighted moving average rate at which events have
occurred since the meter was created.
|
<T> void |
processWith(MetricProcessor<T> processor,
MetricName name,
T context)
Allow the given
MetricProcessor to process this as a metric. |
TimeUnit |
rateUnit()
Returns the meter's rate unit.
|
double |
stdDev()
Returns the standard deviation of all recorded durations.
|
void |
stop()
Stop the instance.
|
double |
sum()
Returns the sum of all recorded durations.
|
TimerContext |
time()
Returns a timing
TimerContext, which measures an elapsed time in nanoseconds. |
<T> T |
time(Callable<T> event)
Times and records the duration of event.
|
void |
update(long duration,
TimeUnit unit)
Adds a recorded duration.
|
public TimeUnit durationUnit()
public TimeUnit rateUnit()
Meteredpublic void clear()
public void update(long duration,
TimeUnit unit)
duration - the length of the durationunit - the scale unit of durationpublic <T> T time(Callable<T> event) throws Exception
T - the type of the value returned by eventevent - a Callable whose Callable.call() method implements a process
whose duration should be timedeventException - if event throws an Exceptionpublic TimerContext time()
TimerContext, which measures an elapsed time in nanoseconds.TimerContextpublic long count()
Meteredpublic double fifteenMinuteRate()
Meteredtop Unix command.fifteenMinuteRate in interface Meteredpublic double fiveMinuteRate()
Meteredtop Unix command.fiveMinuteRate in interface Meteredpublic double meanRate()
Meteredpublic double oneMinuteRate()
Meteredtop Unix command.oneMinuteRate in interface Meteredpublic double max()
max in interface Summarizablepublic double min()
min in interface Summarizablepublic double mean()
mean in interface Summarizablepublic double stdDev()
stdDev in interface Summarizablepublic double sum()
sum in interface Summarizablepublic Snapshot getSnapshot()
SamplinggetSnapshot in interface Samplingpublic String eventType()
Meteredpublic void stop()
Stoppablepublic <T> void processWith(MetricProcessor<T> processor, MetricName name, T context) throws Exception
MetricMetricProcessor to process this as a metric.processWith in interface MetricT - the type of the context objectprocessor - a MetricProcessorname - the name of the current metriccontext - a given context which should be passed on to processorException - if something goes wrongCopyright © 2012. All Rights Reserved.