[PATCH] Add bw/lat log as job options
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index 4ba8f193967e8ce51d8134ba7e5b42bc908de1a9..718a8ab2acc1ee65618f132c3efabb9dc6ce7aef 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -446,11 +446,9 @@ void show_run_stats(void)
                rs->min_bw[1] = rs->min_run[1] = ~0UL;
        }
 
                rs->min_bw[1] = rs->min_run[1] = ~0UL;
        }
 
-       for (i = 0; i < thread_number; i++) {
+       for_each_td(td, i) {
                unsigned long long rbw, wbw;
 
                unsigned long long rbw, wbw;
 
-               td = &threads[i];
-
                if (td->error) {
                        fprintf(f_out, "%s: %s\n", td->name, td->verror);
                        continue;
                if (td->error) {
                        fprintf(f_out, "%s: %s\n", td->name, td->verror);
                        continue;
@@ -501,8 +499,7 @@ void show_run_stats(void)
        if (!terse_output)
                printf("\n");
 
        if (!terse_output)
                printf("\n");
 
-       for (i = 0; i < thread_number; i++) {
-               td = &threads[i];
+       for_each_td(td, i) {
                rs = &runstats[td->groupid];
 
                if (terse_output)
                rs = &runstats[td->groupid];
 
                if (terse_output)