fio: fix aio trim completion latencies
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index ecef1099f38729aae7ff1d9125c5c93de0072478..bf87917c2956eb60729fa9ea95ac93b1cbe1ed50 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -1244,12 +1244,13 @@ static void show_thread_status_terse_all(struct thread_stat *ts,
        /* Additional output if continue_on_error set - default off*/
        if (ts->continue_on_error)
                log_buf(out, ";%llu;%d", (unsigned long long) ts->total_err_count, ts->first_error);
-       if (ver == 2)
-               log_buf(out, "\n");
 
        /* Additional output if description is set */
-       if (strlen(ts->description))
+       if (strlen(ts->description)) {
+               if (ver == 2)
+                       log_buf(out, "\n");
                log_buf(out, ";%s", ts->description);
+       }
 
        log_buf(out, "\n");
 }
@@ -1682,15 +1683,14 @@ void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src,
                dst->io_u_submit[k] += src->io_u_submit[k];
                dst->io_u_complete[k] += src->io_u_complete[k];
        }
-       for (k = 0; k < FIO_IO_U_LAT_N_NR; k++) {
+
+       for (k = 0; k < FIO_IO_U_LAT_N_NR; k++)
                dst->io_u_lat_n[k] += src->io_u_lat_n[k];
-       }
-       for (k = 0; k < FIO_IO_U_LAT_U_NR; k++) {
+       for (k = 0; k < FIO_IO_U_LAT_U_NR; k++)
                dst->io_u_lat_u[k] += src->io_u_lat_u[k];
-       }
-       for (k = 0; k < FIO_IO_U_LAT_M_NR; k++) {
+       for (k = 0; k < FIO_IO_U_LAT_M_NR; k++)
                dst->io_u_lat_m[k] += src->io_u_lat_m[k];
-       }
+
        for (k = 0; k < FIO_IO_U_PLAT_NR; k++)
                dst->io_u_sync_plat[k] += src->io_u_sync_plat[k];