@Test public void testPercentileAlgorithm_Percentiles() { PercentileSnapshot p = getPercentileForValues(10, 30, 20, 40); Assert.assertEquals(22, p.getPercentile(30), 1.0e-5); Assert.assertEquals(20, p.getPercentile(25), 1.0e-5); Assert.assertEquals(40, p.getPercentile(75), 1.0e-5); Assert.assertEquals(30, p.getPercentile(50), 1.0e-5); Assert.assertEquals(10, p.getPercentile(-1)); Assert.assertEquals(40, p.getPercentile(101)); }
public int getPercentile(double percentile) { if (!enabled.get()) return -1; getCurrentBucket(); return getCurrentPercentileSnapshot().getPercentile(percentile); }
NumerusRollingPercentile { public int getPercentile(double percentile) { if (!enabled.get()) return -1; getCurrentBucket(); return getCurrentPercentileSnapshot().getPercentile(percentile); } }
NumerusRollingPercentile { public int getPercentile(double percentile) { if (!enabled.get()) return -1; getCurrentBucket(); return getCurrentPercentileSnapshot().getPercentile(percentile); } NumerusRollingPercentile(NumerusProperty<Integer> timeInMilliseconds, NumerusProperty<Integer> numberOfBuckets, NumerusProperty<Integer> bucketDataLength, NumerusProperty<Boolean> enabled);   NumerusRollingPercentile(Time time, NumerusProperty<Integer> timeInMilliseconds, NumerusProperty<Integer> numberOfBuckets, NumerusProperty<Integer> bucketDataLength, NumerusProperty<Boolean> enabled); }
NumerusRollingPercentile { public int getPercentile(double percentile) { if (!enabled.get()) return -1; getCurrentBucket(); return getCurrentPercentileSnapshot().getPercentile(percentile); } NumerusRollingPercentile(NumerusProperty<Integer> timeInMilliseconds, NumerusProperty<Integer> numberOfBuckets, NumerusProperty<Integer> bucketDataLength, NumerusProperty<Boolean> enabled);   NumerusRollingPercentile(Time time, NumerusProperty<Integer> timeInMilliseconds, NumerusProperty<Integer> numberOfBuckets, NumerusProperty<Integer> bucketDataLength, NumerusProperty<Boolean> enabled); void addValue(int... value); int getPercentile(double percentile); int getMean(); void reset(); }
NumerusRollingPercentile { public int getPercentile(double percentile) { if (!enabled.get()) return -1; getCurrentBucket(); return getCurrentPercentileSnapshot().getPercentile(percentile); } NumerusRollingPercentile(NumerusProperty<Integer> timeInMilliseconds, NumerusProperty<Integer> numberOfBuckets, NumerusProperty<Integer> bucketDataLength, NumerusProperty<Boolean> enabled);   NumerusRollingPercentile(Time time, NumerusProperty<Integer> timeInMilliseconds, NumerusProperty<Integer> numberOfBuckets, NumerusProperty<Integer> bucketDataLength, NumerusProperty<Boolean> enabled); void addValue(int... value); int getPercentile(double percentile); int getMean(); void reset();  }