@Test public void testPercentileInterpolates() { for (int i = 0; i < 9999; i++) { percentiles.record(i); } checkPercentiles(percentiles, 0, 999.8, 4999, 8998.2, 9898.02, 9988.002, 9997.0002, 9998); checkValuesAreFlushed(percentiles); }
public void record(T value) { if (sampler == null || sampler.select()) { synchronized (samples) { samples.addLast(value); while (samples.size() > MAX_BUFFER_SIZE) samples.removeFirst(); } } }
Percentile { public void record(T value) { if (sampler == null || sampler.select()) { synchronized (samples) { samples.addLast(value); while (samples.size() > MAX_BUFFER_SIZE) samples.removeFirst(); } } } }
Percentile { public void record(T value) { if (sampler == null || sampler.select()) { synchronized (samples) { samples.addLast(value); while (samples.size() > MAX_BUFFER_SIZE) samples.removeFirst(); } } } Percentile(String name, float samplePercent, double... percentiles);  Percentile(String name, Sampler sampler, double... percentiles);  Percentile(String name, int numSampleWindows,
      @Nullable Sampler sampler, double... percentiles); }
Percentile { public void record(T value) { if (sampler == null || sampler.select()) { synchronized (samples) { samples.addLast(value); while (samples.size() > MAX_BUFFER_SIZE) samples.removeFirst(); } } } Percentile(String name, float samplePercent, double... percentiles);  Percentile(String name, Sampler sampler, double... percentiles);  Percentile(String name, int numSampleWindows,
      @Nullable Sampler sampler, double... percentiles); Map<Double, ? extends Stat<?>> getPercentiles(); void record(T value); }
Percentile { public void record(T value) { if (sampler == null || sampler.select()) { synchronized (samples) { samples.addLast(value); while (samples.size() > MAX_BUFFER_SIZE) samples.removeFirst(); } } } Percentile(String name, float samplePercent, double... percentiles);  Percentile(String name, Sampler sampler, double... percentiles);  Percentile(String name, int numSampleWindows,
      @Nullable Sampler sampler, double... percentiles); Map<Double, ? extends Stat<?>> getPercentiles(); void record(T value);  }