X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=eb15dc2873f77fc3144466b2225c2890a7043614;hp=6622bc0a8b66ea6eb1dc31f5faafbae8cabf4205;hb=a47591e4923fb8faef18e1cd5125a50429282089;hpb=604577f1329b617d724d6712868d344a5adf5251 diff --git a/io_u.c b/io_u.c index 6622bc0a..eb15dc28 100644 --- a/io_u.c +++ b/io_u.c @@ -1710,16 +1710,18 @@ static void account_io_completion(struct thread_data *td, struct io_u *io_u, } } - if (!td->o.disable_clat) { - add_clat_sample(td, idx, lusec, bytes, io_u->offset); - io_u_mark_latency(td, lusec); - } + if (ddir_rw(idx)) { + if (!td->o.disable_clat) { + add_clat_sample(td, idx, lusec, bytes, io_u->offset); + io_u_mark_latency(td, lusec); + } - if (!td->o.disable_bw) - add_bw_sample(td, idx, bytes, &icd->time); + if (!td->o.disable_bw && per_unit_log(td->bw_log)) + add_bw_sample(td, io_u, bytes, lusec); - if (no_reduce) - add_iops_sample(td, idx, bytes, &icd->time); + if (no_reduce && per_unit_log(td->iops_log)) + add_iops_sample(td, io_u, bytes); + } if (td->ts.nr_block_infos && io_u->ddir == DDIR_TRIM) { uint32_t *info = io_u_block_info(td, io_u);