Fix 'min' latency times being 0 with ramp_time
authorJens Axboe <axboe@kernel.dk>
Fri, 14 Dec 2018 21:36:52 +0000 (14:36 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 14 Dec 2018 21:36:52 +0000 (14:36 -0700)
commit5b8f19b7afe0cabc002c453a1a4abd7a494880bb
tree8ecb4d11e89e02118a2bfa352d25b234a5715079
parentf635f1fbe188cf7284be4ba371761822e2e22a21
Fix 'min' latency times being 0 with ramp_time

If the job includes a ramp_time setting, we end up with latencies
that look like this:

    slat (nsec): min=0, max=17585, avg=1896.34, stdev=733.35
    clat (nsec): min=0, max=1398.1k, avg=77851.76, stdev=25055.97
     lat (nsec): min=0, max=1406.1k, avg=79824.20, stdev=25066.57

with the 'min' being 0. This is because the reset stats sets the
field to zero, and no new IO will be smaller than that...

Set the min value to the max value of the type when we reset stats.

Reported-by: Matthew Eaton <m.eaton82@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
stat.c