Package org.infinispan.stats.percentiles
Class ReservoirSampler
- java.lang.Object
-
- org.infinispan.stats.percentiles.ReservoirSampler
-
-
Constructor Summary
Constructors Constructor Description ReservoirSampler()
ReservoirSampler(int numSpots)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getKPercentile(int k)
void
insertSample(double sample)
void
reset()
-
-
-
Method Detail
-
insertSample
public final void insertSample(double sample)
-
getKPercentile
public final double getKPercentile(int k) throws IllegalArgumentException
- Parameters:
k
- the percentage of observations. Should be a value between 0 and 100 exclusively.- Returns:
- the percentile value for the k% observations.
- Throws:
IllegalArgumentException
- if k is not between 0 and 100 exclusively.
-
reset
public final void reset()
-
-