@Test public void testDecayedCountsWithClockIncrementSmallerThanRescaleThreshold() { int targetAgeInSeconds = (int) (QuantileDigest.RESCALE_THRESHOLD_SECONDS - 1); TestingTicker ticker = new TestingTicker(); QuantileDigest digest = new QuantileDigest(1, ExponentialDecay.computeAlpha(0.5, targetAgeInSeconds), ticker); addAll(digest, asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)); ticker.elapseTime(targetAgeInSeconds, TimeUnit.SECONDS); addAll(digest, asList(10, 11, 12, 13, 14, 15, 16, 17, 18, 19)); assertEquals(digest.getCount(), 15.0); }
public double getCount() { return weightedCount / weight(TimeUnit.NANOSECONDS.toSeconds(ticker.read())); }
QuantileDigest { public double getCount() { return weightedCount / weight(TimeUnit.NANOSECONDS.toSeconds(ticker.read())); } }
QuantileDigest { public double getCount() { return weightedCount / weight(TimeUnit.NANOSECONDS.toSeconds(ticker.read())); } QuantileDigest(double maxError);  QuantileDigest(double maxError, double alpha); @VisibleForTesting  QuantileDigest(double maxError, double alpha, Ticker ticker);  QuantileDigest(QuantileDigest other);  QuantileDigest(Slice serialized); }
QuantileDigest { public double getCount() { return weightedCount / weight(TimeUnit.NANOSECONDS.toSeconds(ticker.read())); } QuantileDigest(double maxError);  QuantileDigest(double maxError, double alpha); @VisibleForTesting  QuantileDigest(double maxError, double alpha, Ticker ticker);  QuantileDigest(QuantileDigest other);  QuantileDigest(Slice serialized); double getMaxError(); double getAlpha(); void add(long value); void add(long value, long count); void merge(QuantileDigest other); List<Long> getQuantilesLowerBound(List<Double> quantiles); List<Long> getQuantilesUpperBound(List<Double> quantiles); List<Long> getQuantiles(List<Double> quantiles); long getQuantile(double quantile); long getQuantileLowerBound(double quantile); long getQuantileUpperBound(double quantile); double getCount(); List<Bucket> getHistogram(List<Long> bucketUpperBounds); List<Bucket> getHistogram(List<Long> bucketUpperBounds, MiddleFunction middleFunction); long getMin(); long getMax(); int estimatedInMemorySizeInBytes(); int estimatedSerializedSizeInBytes(); Slice serialize(); double getConfidenceFactor(); @SuppressFBWarnings("VA_FORMAT_STRING_USES_NEWLINE") String toGraphviz(); }
QuantileDigest { public double getCount() { return weightedCount / weight(TimeUnit.NANOSECONDS.toSeconds(ticker.read())); } QuantileDigest(double maxError);  QuantileDigest(double maxError, double alpha); @VisibleForTesting  QuantileDigest(double maxError, double alpha, Ticker ticker);  QuantileDigest(QuantileDigest other);  QuantileDigest(Slice serialized); double getMaxError(); double getAlpha(); void add(long value); void add(long value, long count); void merge(QuantileDigest other); List<Long> getQuantilesLowerBound(List<Double> quantiles); List<Long> getQuantilesUpperBound(List<Double> quantiles); List<Long> getQuantiles(List<Double> quantiles); long getQuantile(double quantile); long getQuantileLowerBound(double quantile); long getQuantileUpperBound(double quantile); double getCount(); List<Bucket> getHistogram(List<Long> bucketUpperBounds); List<Bucket> getHistogram(List<Long> bucketUpperBounds, MiddleFunction middleFunction); long getMin(); long getMax(); int estimatedInMemorySizeInBytes(); int estimatedSerializedSizeInBytes(); Slice serialize(); double getConfidenceFactor(); @SuppressFBWarnings("VA_FORMAT_STRING_USES_NEWLINE") String toGraphviz();  }