@Test public void none() throws Exception { Id id = new DefaultId("foo"); StepDigest digest = new StepDigest(id, 100.0, clock, 10); clock.setWallTime(10); Assert.assertEquals(Double.NaN, digest.poll().quantile(0.5), 0.2); }
@Test public void addTwoValues() throws Exception { Id id = new DefaultId("foo"); StepDigest digest = new StepDigest(id, 100.0, clock, 10); digest.add(1.0); digest.add(100.0); clock.setWallTime(10); Assert.assertEquals(50.5, digest.poll().quantile(0.5), 0.2); }