stat: only apply proper stat summing for event timestamps
We generally sum two kinds of stats, one that is per-io type numbers,
and one that are just samples of performance (like iops, bw). Only
apply proper stat summing to the former, for the latter we just want
to add them up.
This fixes a group reporting case where we have multiple jobs, and
the IOPS/BW output still shows per-job numbers. Before, we'd have:
read: IOPS=345k, BW=1346MiB/s (1411MB/s)(6229MiB/4628msec)
[...]
bw ( KiB/s): min=282816, max=377080, per=24.99%, avg=344438.00, stdev=35329.77, samples=36
iops : min=70704, max=94270, avg=86109.50, stdev=8832.44, samples=36
with bw/iops showing per-job numbers, after this the same looks like:
read: IOPS=349k, BW=1365MiB/s (1431MB/s)(6719MiB/4922msec)
[...]
bw ( MiB/s): min= 1302, max= 1420, per=99.86%, avg=1363.02, stdev=11.14, samples=36
iops : min=333433, max=363668, avg=348933.33, stdev=2850.64, samples=36
which is more in line with what a user would expect.
Fixes: https://github.com/axboe/fio/issues/519
Signed-off-by: Jens Axboe <axboe@kernel.dk>