@Test public void testWithBucketIdProvider() throws Exception { SparseTimeStat stat = new SparseTimeStat(); stat.setBucketIdProvider(bucketIdProvider); stat.add(1, MILLISECONDS); assertPreviousDistributionEmpty(stat); ++bucketIdProvider.id; stat.add(new Duration(2, MILLISECONDS)); stat.add(3_000_000, NANOSECONDS); assertPreviousDistribution(stat, 1, .001, .001, .001); ++bucketIdProvider.id; assertPreviousDistribution(stat, 2, .002, .003, .005); }
public void add(long value, TimeUnit timeUnit) { add(timeUnit.toNanos(value)); }
SparseTimeStat extends Bucketed<SparseTimeStat.Distribution> { public void add(long value, TimeUnit timeUnit) { add(timeUnit.toNanos(value)); } }
SparseTimeStat extends Bucketed<SparseTimeStat.Distribution> { public void add(long value, TimeUnit timeUnit) { add(timeUnit.toNanos(value)); } SparseTimeStat();  SparseTimeStat(Ticker ticker); }
SparseTimeStat extends Bucketed<SparseTimeStat.Distribution> { public void add(long value, TimeUnit timeUnit) { add(timeUnit.toNanos(value)); } SparseTimeStat();  SparseTimeStat(Ticker ticker); void add(long value, TimeUnit timeUnit); void add(double value, TimeUnit timeUnit); void add(Duration duration); T time(Callable<T> callable); BlockTimer time(); }
SparseTimeStat extends Bucketed<SparseTimeStat.Distribution> { public void add(long value, TimeUnit timeUnit) { add(timeUnit.toNanos(value)); } SparseTimeStat();  SparseTimeStat(Ticker ticker); void add(long value, TimeUnit timeUnit); void add(double value, TimeUnit timeUnit); void add(Duration duration); T time(Callable<T> callable); BlockTimer time();  }