- add_clat_sample(td, idx, usec);
- add_bw_sample(td, idx, &icd->time);
- io_u_mark_latency(td, usec);
+ if (!td->o.disable_clat || !td->o.disable_bw)
+ lusec = utime_since(&io_u->issue_time,
+ &icd->time);
+
+ if (!td->o.disable_clat) {
+ add_clat_sample(td, idx, lusec, bytes);
+ io_u_mark_latency(td, lusec);
+ }
+ if (!td->o.disable_bw)
+ add_bw_sample(td, idx, bytes, &icd->time);
+ if (__should_check_rate(td, idx)) {
+ td->rate_pending_usleep[idx] =
+ ((td->this_io_bytes[idx] *
+ td->rate_nsec_cycle[idx]) / 1000 -
+ utime_since_now(&td->start));
+ }
+ if (__should_check_rate(td, idx ^ 1))
+ td->rate_pending_usleep[odx] =
+ ((td->this_io_bytes[odx] *
+ td->rate_nsec_cycle[odx]) / 1000 -
+ utime_since_now(&td->start));
+ }