|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.netflix.stats.distribution.DataAccumulator
com.netflix.stats.distribution.DataDistribution
public class DataDistribution
A DataAccumulator that also publishes statistics about the "previous" buffer.
This implements DataDistributionMBean
and so can be registered as an MBean and accessed via JMX if desired.
| Constructor Summary | |
|---|---|
DataDistribution(int bufferSize,
double[] percents)
Creates a new DataDistribution with no data summarized. |
|
| Method Summary | |
|---|---|
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[] |
getPercentiles()
Gets the array of known percentile values. |
double[] |
getPercents()
Gets the array of known percentile percents. |
long |
getSampleIntervalMillis()
Gets the length of time over which the data was collected, in milliseconds. |
int |
getSampleSize()
Gets the number of values used to compute the percentile values. |
double |
getStdDev()
Get the standard deviation of values in the distribution. |
java.lang.String |
getTimestamp()
Gets a String representation of the time when this data was produced. |
long |
getTimestampMillis()
Gets the time when this data was produced, in milliseconds since the epoch. |
double |
getVariance()
Get the variance (the square of the standard deviation) of values in the distribution. |
protected void |
publish(DataBuffer buf)
Called to publish recently collected data. |
| Methods inherited from class com.netflix.stats.distribution.DataAccumulator |
|---|
noteValue, publish |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataDistribution(int bufferSize,
double[] percents)
bufferSize - the size of each buffer held by the DataAccumulatorpercents - array of percentile values to calculate when buffers
are swapped and new data is published.
The array values must be in the range [0 .. 100].| Method Detail |
|---|
protected void publish(DataBuffer buf)
Lock associated with the "previous"
buffer is held, so the data will not be changed.
Other locks have been released, and so new data can be
collected in the "current" buffer.
The data in the buffer has also been sorted in increasing order.
publish in class DataAccumulatorbuf - the DataBuffer that is now "previous".public 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 java.lang.String getTimestamp()
getTimestamp in interface DataDistributionMBeanpublic long getTimestampMillis()
getTimestampMillis in interface DataDistributionMBeanpublic long getSampleIntervalMillis()
getSampleIntervalMillis in interface DataDistributionMBeanpublic int getSampleSize()
DistributionMBean.getNumValues()
depending on how the percentile values were computed.
getSampleSize in interface DataDistributionMBeanpublic double[] getPercents()
getPercents in interface DataDistributionMBeanpublic double[] getPercentiles()
getPercentiles in interface DataDistributionMBean
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||