fio: reset more counters when ramp time has elapsed
authorVincent Fu <vincent.fu@wdc.com>
Thu, 18 Oct 2018 20:42:54 +0000 (16:42 -0400)
committerJens Axboe <axboe@kernel.dk>
Thu, 18 Oct 2018 21:33:05 +0000 (15:33 -0600)
commit8eb142ddd8bc3fe9428cd46b9fd98f32b2bc8c67
tree0cf353d7e0e48c1411363f71042d8fc65990aeee
parentd5dbacf662b1cc3fb09b5cd70b236ab98d1c0dbe
fio: reset more counters when ramp time has elapsed

Currently,

fio --name=test --ramp_time=2 --time_based=1 --runtime=2s --size=1M

will produce an output line like

  IO depths    : 1=184.7%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%

184.7% appears because the denominator used in the IO depth calculation
is reset at the conclusion of ramp_time but the numerator is not.
Latency and other IO depth statistics also include data from IOs
completed during ramp time. This patch resets these counters when ramp
time is over.

Tested-by: Sebastien Boisvert <sboisvert@gydle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
time.c