diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-10-24 15:43:29 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-10-24 15:43:29 -0600 |
commit | fcd4e7444e4123b16b307a7ff390771842eab494 (patch) | |
tree | a236b50a85f7994852ee319cf2d5b6151639c3ff | |
parent | 4d6d051389d73ea1c900735eb98e9779dc745c97 (diff) | |
download | fio-latency-probe.tar.gz fio-latency-probe.tar.bz2 |
target: fixeslatency-probe
1) Use parent for should_account(), if we have a parent
2) Only sum step stats if src has them, to prevent
overwriting destination stats in the parent.
3) Pretty up the normal output a bit
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | io_u.c | 3 | ||||
-rw-r--r-- | stat.c | 5 | ||||
-rw-r--r-- | target.c | 7 |
3 files changed, 13 insertions, 2 deletions
@@ -1752,6 +1752,9 @@ static void file_log_write_comp(const struct thread_data *td, struct fio_file *f static bool should_account(struct thread_data *td) { + if (td->parent) + td = td->parent; + return lat_step_account(td) && ramp_time_over(td) && (td->runstate == TD_RUNNING || td->runstate == TD_VERIFYING); } @@ -1717,8 +1717,11 @@ void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src, dst->total_complete += src->total_complete; dst->nr_zone_resets += src->nr_zone_resets; - for (l = 0; l < ARRAY_SIZE(dst->step_stats); l++) + for (l = 0; l < ARRAY_SIZE(dst->step_stats); l++) { + if (!__lat_ts_has_stats(src, l)) + continue; sum_lat_step_stats(&dst->step_stats[l], &src->step_stats[l], first); + } } void init_group_run_stat(struct group_run_stats *gs) @@ -296,7 +296,12 @@ void lat_step_report(struct thread_stat *ts, struct buf_output *out) if (!ls->iops[j]) continue; - __log_buf(out, " %s: iops=%llu, lat=%.1f nsec\n", + if (!j) + __log_buf(out, " [%2d] ", i); + else + __log_buf(out, " "); + + __log_buf(out, "%5s: iops=%llu, lat=%.1f nsec\n", io_ddir_name(j), (unsigned long long) ls->iops[j], ls->avg[j].u.f); |