- je->t_rate += td->o.rate[0] + td->o.rate[1];
- je->m_rate += td->o.ratemin[0] + td->o.ratemin[1];
- je->t_iops += td->o.rate_iops[0] + td->o.rate_iops[1];
- je->m_iops += td->o.rate_iops_min[0] +
- td->o.rate_iops_min[1];
+ if (td_read(td)) {
+ je->t_rate += td->o.rate[DDIR_READ];
+ je->t_iops += td->o.rate_iops[DDIR_READ];
+ je->m_rate += td->o.ratemin[DDIR_READ];
+ je->m_iops += td->o.rate_iops_min[DDIR_READ];
+ }
+ if (td_write(td)) {
+ je->t_rate += td->o.rate[DDIR_WRITE];
+ je->t_iops += td->o.rate_iops[DDIR_WRITE];
+ je->m_rate += td->o.ratemin[DDIR_WRITE];
+ je->m_iops += td->o.rate_iops_min[DDIR_WRITE];
+ }
+ if (td_trim(td)) {
+ je->t_rate += td->o.rate[DDIR_TRIM];
+ je->t_iops += td->o.rate_iops[DDIR_TRIM];
+ je->m_rate += td->o.ratemin[DDIR_TRIM];
+ je->m_iops += td->o.rate_iops_min[DDIR_TRIM];
+ }
+