TestingTicker ticker = new TestingTicker();
QuantileDigest digest = new QuantileDigest(1,
ExponentialDecay.computeAlpha(0.5, targetAgeInSeconds), ticker, false);
addAll(digest, asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
ticker.increment(targetAgeInSeconds, TimeUnit.SECONDS);
addAll(digest, asList(10, 11, 12, 13, 14, 15, 16, 17, 18, 19));
// The first 10 values only contribute 5 to the counts per the alpha factor
assertEquals(
digest.getHistogram(asList(10L, 20L)),