@Test public void testSupplier() throws Exception { Supplier<Long> supplier = new Supplier<Long>() { long value = 0; @Override public Long get() { value += 10; return value; } }; control.replay(); assertResults(Rate.of("test", supplier).withTicker(ticker).build(), 10, 10, 10); }
public static <T extends Number> Builder<T> of(Stat<T> input) { return new Builder<T>(input); }
Rate extends SampledStat<Double> { public static <T extends Number> Builder<T> of(Stat<T> input) { return new Builder<T>(input); } }
Rate extends SampledStat<Double> { public static <T extends Number> Builder<T> of(Stat<T> input) { return new Builder<T>(input); } private  Rate(String name, Supplier<T> inputAccessor, int windowSize, double scaleFactor,
      Ticker ticker); }
Rate extends SampledStat<Double> { public static <T extends Number> Builder<T> of(Stat<T> input) { return new Builder<T>(input); } private  Rate(String name, Supplier<T> inputAccessor, int windowSize, double scaleFactor,
      Ticker ticker); static Builder<T> of(Stat<T> input); static Builder<Long> of(String name, Supplier<Long> input); static Builder<AtomicInteger> of(String name, AtomicInteger input); static Builder<AtomicLong> of(String name, AtomicLong input); @Override Double doSample(); }
Rate extends SampledStat<Double> { public static <T extends Number> Builder<T> of(Stat<T> input) { return new Builder<T>(input); } private  Rate(String name, Supplier<T> inputAccessor, int windowSize, double scaleFactor,
      Ticker ticker); static Builder<T> of(Stat<T> input); static Builder<Long> of(String name, Supplier<Long> input); static Builder<AtomicInteger> of(String name, AtomicInteger input); static Builder<AtomicLong> of(String name, AtomicLong input); @Override Double doSample();  }