public class ExponentialLeakyBucket<T> extends Object
long
s. Uses Cormode et al's
forward-decaying priority reservoir sampling method to produce a statistically representative
sampling reservoir, exponentially biased towards newer entries.Constructor and Description |
---|
ExponentialLeakyBucket()
Creates a new
ExponentialLeakyBucket of 1028 elements, which offers a 99.9%
confidence level with a 5% margin of error assuming a normal distribution, and an alpha
factor of 0.015, which heavily biases the reservoir to the past 5 minutes of measurements. |
ExponentialLeakyBucket(int size,
double alpha)
Creates a new
ExponentialLeakyBucket . |
ExponentialLeakyBucket(int size,
double alpha,
com.codahale.metrics.Clock clock)
Creates a new
ExponentialLeakyBucket . |
public ExponentialLeakyBucket()
ExponentialLeakyBucket
of 1028 elements, which offers a 99.9%
confidence level with a 5% margin of error assuming a normal distribution, and an alpha
factor of 0.015, which heavily biases the reservoir to the past 5 minutes of measurements.public ExponentialLeakyBucket(int size, double alpha)
ExponentialLeakyBucket
.size
- the number of samples to keep in the sampling reservoiralpha
- the exponential decay factor; the higher this is, the more biased the reservoir
will be towards newer valuespublic ExponentialLeakyBucket(int size, double alpha, com.codahale.metrics.Clock clock)
ExponentialLeakyBucket
.size
- the number of samples to keep in the sampling reservoiralpha
- the exponential decay factor; the higher this is, the more biased the reservoir
will be towards newer valuesCopyright © 2004-2016. All Rights Reserved.