public class Histogram extends Object implements Metric, Sampling, Summarizable
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all recorded values.
|
long |
count()
Returns the number of values recorded.
|
Snapshot |
getSnapshot()
Returns a snapshot of the values.
|
double |
max()
Returns the largest recorded value.
|
double |
mean()
Returns the arithmetic mean of all recorded values.
|
double |
min()
Returns the smallest recorded value.
|
<T> void |
processWith(MetricProcessor<T> processor,
MetricName name,
T context)
Allow the given
MetricProcessor to process this as a metric. |
double |
stdDev()
Returns the standard deviation of all recorded values.
|
void |
update(int value)
Adds a recorded value.
|
void |
update(long value)
Adds a recorded value.
|
public void clear()
public void update(int value)
value - the length of the valuepublic void update(long value)
value - the length of the valuepublic long count()
public double max()
Summarizablemax in interface Summarizablepublic double min()
Summarizablemin in interface Summarizablepublic double mean()
Summarizablemean in interface Summarizablepublic double stdDev()
SummarizablestdDev in interface Summarizablepublic Snapshot getSnapshot()
SamplinggetSnapshot in interface Samplingpublic <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.