Fix clat latency terse output
authorKeplar kramer <kkramer@fusionio.com>
Wed, 19 Oct 2011 19:31:27 +0000 (21:31 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Oct 2011 19:36:34 +0000 (21:36 +0200)
The fio HOWTO shows Completion latency percentiles as coming after
Completion latency stats and before total latency stats.

Completion latency percentiles are actually after total latency stats
and before BW stats.

Patch moves completion percentiles to before total latency stats.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
stat.c

diff --git a/stat.c b/stat.c
index d54ed2cfeac3c1f4db320f9b913533527a666417..2400cd70f04c49a5d2ba74e3d6fa590c5ae2e65c 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -628,11 +628,6 @@ static void show_ddir_status_terse(struct thread_stat *ts,
        else
                log_info(";%lu;%lu;%f;%f", 0UL, 0UL, 0.0, 0.0);
 
-       if (calc_lat(&ts->lat_stat[ddir], &min, &max, &mean, &dev))
-               log_info(";%lu;%lu;%f;%f", min, max, mean, dev);
-       else
-               log_info(";%lu;%lu;%f;%f", 0UL, 0UL, 0.0, 0.0);
-
        if (ts->clat_percentiles) {
                len = calc_clat_percentiles(ts->io_u_plat[ddir],
                                        ts->clat_stat[ddir].samples,
@@ -648,6 +643,12 @@ static void show_ddir_status_terse(struct thread_stat *ts,
                }
                log_info(";%2.2f%%=%u", ts->percentile_list[i].u.f, ovals[i]);
        }
+
+       if (calc_lat(&ts->lat_stat[ddir], &min, &max, &mean, &dev))
+               log_info(";%lu;%lu;%f;%f", min, max, mean, dev);
+       else
+               log_info(";%lu;%lu;%f;%f", 0UL, 0UL, 0.0, 0.0);
+
        if (ovals)
                free(ovals);