|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.netflix.stats.distribution.Distribution
public class Distribution
Accumulator of statistics about a distribution of observed values that are produced incrementally.
Note that the implementation is not synchronized, and simultaneous updates may produce incorrect results. In most cases these incorrect results will be unimportant, but applications that care should synchronize carefully to ensure consistent results.
Note that this implements DistributionMBean and so can be
registered as an MBean and accessed via JMX if desired.
| Constructor Summary | |
|---|---|
Distribution()
Creates a new initially empty Distribution. |
|
| Method Summary | |
|---|---|
void |
add(Distribution anotherDistribution)
Add another Distribution's values to this one. |
void |
clear()
Clears out the distribution, resetting it to its initial state. |
double |
getMaximum()
Get the maximum value found in the distribution. |
double |
getMean()
Get the average value in the distribtion. |
double |
getMinimum()
Get the minimum value found in the distribution. |
long |
getNumValues()
Get the number of values in the distribution. |
double |
getStdDev()
Get the standard deviation of values in the distribution. |
double |
getVariance()
Get the variance (the square of the standard deviation) of values in the distribution. |
void |
noteValue(double val)
Adds a value to the collected data. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Distribution()
| Method Detail |
|---|
public void noteValue(double val)
noteValue in interface DataCollectorpublic void clear()
clear in interface DistributionMBeanpublic long getNumValues()
getNumValues in interface DistributionMBeanpublic double getMean()
getMean in interface DistributionMBeanpublic double getVariance()
getVariance in interface DistributionMBeanpublic double getStdDev()
getStdDev in interface DistributionMBeanpublic double getMinimum()
getMinimum in interface DistributionMBeanpublic double getMaximum()
getMaximum in interface DistributionMBeanpublic void add(Distribution anotherDistribution)
Distribution's values to this one.
anotherDistribution - the other Distribution instancepublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||