|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yammer.metrics.core.HistogramMetric
public class HistogramMetric
A metric which calculates the distribution of a value.
| Nested Class Summary | |
|---|---|
static class |
HistogramMetric.SampleType
The type of sampling the histogram should be performing. |
| Constructor Summary | |
|---|---|
HistogramMetric(HistogramMetric.SampleType type)
Creates a new HistogramMetric with the given sample type. |
|
HistogramMetric(Sample sample)
Creates a new HistogramMetric with the given sample. |
|
| Method Summary | ||
|---|---|---|
void |
clear()
Clears all recorded values. |
|
long |
count()
Returns the number of values recorded. |
|
void |
dump(File output)
Writes the values of the histogram's sample to the given file. |
|
double |
max()
Returns the largest recorded value. |
|
double |
mean()
Returns the arithmetic mean of all recorded values. |
|
double |
min()
Returns the smallest recorded value. |
|
double |
percentile(double percentile)
Returns the value at the given percentile. |
|
Double[] |
percentiles(Double... percentiles)
Returns an array of values at the given percentiles. |
|
|
processWith(MetricsProcessor<T> processor,
MetricName name,
T context)
|
|
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. |
|
List<Long> |
values()
Returns a list of all values in the histogram's sample. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HistogramMetric(HistogramMetric.SampleType type)
HistogramMetric with the given sample type.
type - the type of sample to usepublic HistogramMetric(Sample sample)
HistogramMetric with the given sample.
sample - the sample to create a histogram from| Method Detail |
|---|
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()
Summarized
max in interface Summarizedpublic double min()
Summarized
min in interface Summarizedpublic double mean()
Summarized
mean in interface Summarizedpublic double stdDev()
Summarized
stdDev in interface Summarizedpublic double percentile(double percentile)
percentile in interface Percentiledpercentile - a percentile (0..1)
public Double[] percentiles(Double... percentiles)
percentiles in interface Percentiledpercentiles - one or more percentiles (0..1)
public List<Long> values()
public void dump(File output)
throws IOException
output - the file to which the values will be written
IOException - if there is an error writing the values
public <T> void processWith(MetricsProcessor<T> processor,
MetricName name,
T context)
throws Exception
processWith in interface MetricException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||