X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=io_u.c;h=d1f66a949293310f166690089438e2a883f9feec;hb=c7c6cb4cb3114ec4ce3107e15c184e161b50122e;hp=4dcb1fce44dbbeb4478de8154e502af4eb9f7d32;hpb=15b87723551b424d0db4c53577b567e670c7d4d8;p=fio.git diff --git a/io_u.c b/io_u.c index 4dcb1fce..d1f66a94 100644 --- a/io_u.c +++ b/io_u.c @@ -1293,6 +1293,8 @@ static void account_io_completion(struct thread_data *td, struct io_u *io_u, if (!td->o.disable_bw) add_bw_sample(td, idx, bytes, &icd->time); + + add_iops_sample(td, idx, &icd->time); } static void io_completed(struct thread_data *td, struct io_u *io_u, @@ -1332,6 +1334,7 @@ static void io_completed(struct thread_data *td, struct io_u *io_u, int ret; td->io_blocks[idx]++; + td->this_io_blocks[idx]++; td->io_bytes[idx] += bytes; td->this_io_bytes[idx] += bytes; @@ -1347,7 +1350,7 @@ static void io_completed(struct thread_data *td, struct io_u *io_u, } } - if (ramp_time_over(td)) { + if (ramp_time_over(td) && td->runstate == TD_RUNNING) { account_io_completion(td, io_u, icd, idx, bytes); if (__should_check_rate(td, idx)) {