If we average over time, fio doesn't add the blocksize used. The
reasoning behind that is that if we're using multiple block sizes,
there's no right answer. But if we are not, we can add the blocksize
that was used.
Signed-off-by: Jens Axboe <axboe@fb.com>
add_stat_sample(&ts->bw_stat[ddir], rate);
add_stat_sample(&ts->bw_stat[ddir], rate);
- if (td->bw_log)
- add_log_sample(td, td->bw_log, rate, ddir, 0, 0);
+ if (td->bw_log) {
+ unsigned int bs = 0;
+
+ if (td->o.min_bs[ddir] == td->o.max_bs[ddir])
+ bs = td->o.min_bs[ddir];
+
+ add_log_sample(td, td->bw_log, rate, ddir, bs, 0);
+ }
td->stat_io_bytes[ddir] = td->this_io_bytes[ddir];
}
td->stat_io_bytes[ddir] = td->this_io_bytes[ddir];
}
add_stat_sample(&ts->iops_stat[ddir], iops);
add_stat_sample(&ts->iops_stat[ddir], iops);
- if (td->iops_log)
- add_log_sample(td, td->iops_log, iops, ddir, 0, 0);
+ if (td->iops_log) {
+ unsigned int bs = 0;
+
+ if (td->o.min_bs[ddir] == td->o.max_bs[ddir])
+ bs = td->o.min_bs[ddir];
+
+ add_log_sample(td, td->iops_log, iops, ddir, bs, 0);
+ }
td->stat_io_blocks[ddir] = td->this_io_blocks[ddir];
}
td->stat_io_blocks[ddir] = td->this_io_blocks[ddir];
}