|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.store.stats.Histogram
@Deprecated public class Histogram
A class for computing percentiles based on a simple histogram. The histogram starts at 0 and then has uniformly sized buckets. The number of buckets and width of each bucket is specified upon construction. Each bucket in the histogram "counts" the number of values inserted into the histogram that fall into the bucket's range. All interfaces for adding data to the histogram or querying the histogram for quantiles are synchronized to make this object threadsafe.
Constructor Summary | |
---|---|
Histogram(int nBuckets,
int step)
Deprecated. Initialize an empty histogram |
|
Histogram(int nBuckets,
int step,
long resetIntervalMs)
Deprecated. Initialize an empty histogram |
Method Summary | |
---|---|
double |
getAverage()
Deprecated. Obtain the average of the data in the histogram Note: Caller is responsible for making sure 'sum' does not overflow within the reset interval |
long |
getQuantile(double quantile)
Deprecated. Find the a value n such that the percentile falls within [ n, n + step). |
void |
insert(long data)
Deprecated. Insert a value into the right bucket of the histogram. |
void |
reset()
Deprecated. Reset the histogram back to empty (set all values to 0) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Histogram(int nBuckets, int step, long resetIntervalMs)
nBuckets
- The number of buckets to usestep
- The size of each bucketpublic Histogram(int nBuckets, int step)
nBuckets
- The number of buckets to usestep
- The size (width) of each bucketMethod Detail |
---|
public void reset()
public void insert(long data)
data
- The value to insert into the histogrampublic long getQuantile(double quantile)
quantile
- The percentile to find
public double getAverage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |