@Test public void testSingleValue() { percentiles.record(10); checkPercentiles(percentiles, 10, 10, 10, 10, 10, 10, 10, 10); 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);  }