stat: eliminate extra log samples
authorVincent Fu <vincent.fu@wdc.com>
Tue, 31 Mar 2020 11:26:16 +0000 (07:26 -0400)
committerVincent Fu <vincent.fu@wdc.com>
Tue, 31 Mar 2020 11:32:35 +0000 (07:32 -0400)
commit640150c1b2c3cdbdd8baa5f1f3e7214a5c9a6533
treeaae8d860c8f398e013d90be6cab989aab5f0d50d
parent983319d02626347d178b34320ac5835ae7ecad02
stat: eliminate extra log samples

b2a432bfbb6d inadvertently added extra log samples.

$ ./fio-canonical/fio --name=test --time_based --runtime=10s --write_lat_log=fio-07-b2a432 --log_avg_msec=1000 --size=1G --rw=rw
test: (g=0): rw=rw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
fio-3.17-93-gb2a4
Starting 1 process
...
$ cat fio-07-b2a432_clat.1.log
1000, 5851, 0, 0, 0
1000, 2551, 1, 0, 0
1000, 5028, 1, 0, 0
2000, 4175, 0, 0, 0
2000, 3214, 1, 0, 0
2000, 60619, 0, 0, 0
...

There should only be two lines at each timestamp (one for reads, one for
writes), but the first two timestamps have three lines each.

The cause is an inadvertent change in stat.c:add_log_sample() of
__add_stat_to_log to _add_stat_to_log. Reverting to the two-underscore
version resolves this issue.

Fixes: https://github.com/axboe/fio/issues/947
Fixes: b2a432bfbb6d ("Per-command priority: Priority logging and libaio/io_uring cmdprio_percentage")
Signed-off-by: Vincent Fu <vincent.fu@wdc.com>
stat.c