From: Jens Axboe Date: Mon, 12 Mar 2007 14:24:43 +0000 (+0100) Subject: Group reporting fixes X-Git-Tag: fio-1.14~31 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=7abd0e3a872b000aefb740028f777aae1fa6f77d;hp=3c5df6fa2259c12fd6a7beb9a3521dec76d12dd2 Group reporting fixes Signed-off-by: Jens Axboe --- diff --git a/stat.c b/stat.c index 8d391a35..1eb55be4 100644 --- a/stat.c +++ b/stat.c @@ -669,18 +669,27 @@ void show_run_stats(void) ts->slat_stat[j].min_val = -1UL; ts->bw_stat[j].min_val = -1UL; } + ts->groupid = -1; } j = 0; last_ts = -1; idx = 0; for_each_td(td, i) { + if (idx && (!td->group_reporting || + (td->group_reporting && last_ts != td->groupid))) { + idx = 0; + j++; + } + + last_ts = td->groupid; + ts = &threadstats[j]; idx++; ts->members++; - if (!ts->groupid) { + if (ts->groupid == -1) { /* * These are per-group shared already */ @@ -724,21 +733,6 @@ void show_run_stats(void) ts->total_io_u[k] += td->ts.total_io_u[k]; ts->total_run_time += td->ts.total_run_time; - - if (!td->group_reporting) { - idx = 0; - j++; - continue; - } - if (last_ts == td->groupid) - continue; - - if (last_ts != -1) { - idx = 0; - j++; - } - - last_ts = td->groupid; } for (i = 0; i < nr_ts; i++) {