The underlying Rate stats used here are only updated when sampled, so the
value you have sent to accumulate() is not reflected in rates and ratios
until doSample() is called on them.  For the purposes of this test, it may
be easiest to integrate with TimeSeriesRepositoryImpl and manually induce
sampling.

On Sat, Dec 2, 2017 at 12:17 PM, Mohit Jaggi <mohit.ja...@uber.com> wrote:

> Folks,
> I am trying to write a test case and could not find one to refer to. I
> want to set writerWaitStats below to a large value to simulate high values
> for log_storage_write_lock_wait_ns_per_event
> I tried calling accumulate once with a large value or several times with
> large values but it is always zero for log_storage_write_lock_
> wait_ns_per_event
> What am I missing?
>
> Mohit.
>
>
> private SlidingStats writerWaitStats = new 
> SlidingStats("log_storage_write_lock_wait", "ns");
>
> writerWaitStats.accumulate(100000000000000000L);
>
>

Reply via email to