// increment to another bucket so we include all of the above in the PercentileSnapshot
time.increment(6000);
// the rolling version should have the same data as creating a snapshot like this
PercentileSnapshot ps = new PercentileSnapshot(1000, 1000, 1000, 2000, 1000, 500, 200, 200, 1600, 200, 1600, 1600);
assertEquals(ps.getPercentile(0.15), p.getPercentile(0.15));
assertEquals(ps.getPercentile(0.50), p.getPercentile(0.50));
assertEquals(ps.getPercentile(0.90), p.getPercentile(0.90));
assertEquals(ps.getPercentile(0.995), p.getPercentile(0.995));
System.out.println("100th: " + ps.getPercentile(100) + " " + p.getPercentile(100));
System.out.println("99.5th: " + ps.getPercentile(99.5) + " " + p.getPercentile(99.5));
System.out.println("99th: " + ps.getPercentile(99) + " " + p.getPercentile(99));
System.out.println("90th: " + ps.getPercentile(90) + " " + p.getPercentile(90));
System.out.println("50th: " + ps.getPercentile(50) + " " + p.getPercentile(50));
System.out.println("10th: " + ps.getPercentile(10) + " " + p.getPercentile(10));
// mean = 1000+1000+1000+2000+1000+500+200+200+1600+200+1600+1600/12
assertEquals(991, ps.getMean());
}