Terse output change
authorJens Axboe <jens.axboe@oracle.com>
Tue, 6 Mar 2007 18:50:58 +0000 (19:50 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 6 Mar 2007 18:50:58 +0000 (19:50 +0100)
- Missing a comma.
- Change comma to semicolon, less confusion over floating point numbers.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
HOWTO
stat.c

diff --git a/HOWTO b/HOWTO
index 348b6c8..ea943ee 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -669,10 +669,11 @@ util=             The disk utilization. A value of 100% means we kept the disk
 ----------------
 
 For scripted usage where you typically want to generate tables or graphs
-of the results, fio can output the results in a comma separated format.
+of the results, fio can output the results in a semicolon separated format.
 The format is one long line of values, such as:
 
-client1,0,0,936,331,2894,0,0,0.000000,0.000000,1,170,22.115385,34.290410,16,714,84.252874%,366.500000,566.417819,3496,1237,2894,0,0,0.000000,0.000000,0,246,6.671625,21.436952,0,2534,55.465300%,1406.600000,2008.044216,0.000000%,0.431928%,1109
+client1;0;0;1906777;1090804;1790;0;0;0.000000;0.000000;0;0;0.000000;0.000000;929380;1152890;25.510151%;1078276.333333;128948.113404;0;0;0;0;0;0.000000;0.000000;0;0;0.000000;0.000000;0;0;0.000000%;0.000000;0.000000;100.000000%;0.000000%;324;100.0%;0.0%;0.0%;0.0%;0.0%;0.0%;0.0%;100.0%;0.0%;0.0%;0.0%;0.0%;0.0%
+;0.0%;0.0%;0.0%;0.0%;0.0%
 
 Split up, the format is as follows:
 
diff --git a/stat.c b/stat.c
index 0b18dd3..9fc92d4 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -530,25 +530,25 @@ static void show_ddir_status_terse(struct thread_stat *ts,
        if (ts->runtime[ddir])
                bw = ts->io_bytes[ddir] / ts->runtime[ddir];
 
-       fprintf(f_out, ",%llu,%llu,%lu", ts->io_bytes[ddir] >> 10, bw, ts->runtime[ddir]);
+       fprintf(f_out, ";%llu;%llu;%lu", ts->io_bytes[ddir] >> 10, bw, ts->runtime[ddir]);
 
        if (calc_lat(&ts->slat_stat[ddir], &min, &max, &mean, &dev))
-               fprintf(f_out, ",%lu,%lu,%f,%f", min, max, mean, dev);
+               fprintf(f_out, ";%lu;%lu;%f;%f", min, max, mean, dev);
        else
-               fprintf(f_out, ",%lu,%lu,%f,%f", 0UL, 0UL, 0.0, 0.0);
+               fprintf(f_out, ";%lu;%lu;%f;%f", 0UL, 0UL, 0.0, 0.0);
 
        if (calc_lat(&ts->clat_stat[ddir], &min, &max, &mean, &dev))
-               fprintf(f_out, ",%lu,%lu,%f,%f", min, max, mean, dev);
+               fprintf(f_out, ";%lu;%lu;%f;%f", min, max, mean, dev);
        else
-               fprintf(f_out, ",%lu,%lu,%f,%f", 0UL, 0UL, 0.0, 0.0);
+               fprintf(f_out, ";%lu;%lu;%f;%f", 0UL, 0UL, 0.0, 0.0);
 
        if (calc_lat(&ts->bw_stat[ddir], &min, &max, &mean, &dev)) {
                double p_of_agg;
 
                p_of_agg = mean * 100 / (double) rs->agg[ddir];
-               fprintf(f_out, ",%lu,%lu,%f%%,%f,%f", min, max, p_of_agg, mean, dev);
+               fprintf(f_out, ";%lu;%lu;%f%%;%f;%f", min, max, p_of_agg, mean, dev);
        } else
-               fprintf(f_out, ",%lu,%lu,%f%%,%f,%f", 0UL, 0UL, 0.0, 0.0, 0.0);
+               fprintf(f_out, ";%lu;%lu;%f%%;%f;%f", 0UL, 0UL, 0.0, 0.0, 0.0);
 }
 
 
@@ -559,7 +559,7 @@ static void show_thread_status_terse(struct thread_stat *ts,
        double io_u_lat[FIO_IO_U_LAT_NR];
        double usr_cpu, sys_cpu;
 
-       fprintf(f_out, "%s,%d,%d", ts->name, ts->groupid, ts->error);
+       fprintf(f_out, "%s;%d;%d", ts->name, ts->groupid, ts->error);
 
        show_ddir_status_terse(ts, rs, 0);
        show_ddir_status_terse(ts, rs, 1);
@@ -574,18 +574,18 @@ static void show_thread_status_terse(struct thread_stat *ts,
                sys_cpu = 0;
        }
 
-       fprintf(f_out, ",%f%%,%f%%,%lu", usr_cpu, sys_cpu, ts->ctx);
+       fprintf(f_out, ";%f%%;%f%%;%lu", usr_cpu, sys_cpu, ts->ctx);
 
        stat_calc_dist(ts, io_u_dist);
        stat_calc_lat(ts, io_u_lat);
 
-       fprintf(f_out, ",%3.1f%%,%3.1f%%,%3.1f%%,%3.1f%%,%3.1f%%,%3.1f%%,%3.1f%%", io_u_dist[0], io_u_dist[1], io_u_dist[2], io_u_dist[3], io_u_dist[4], io_u_dist[5], io_u_dist[6]);
+       fprintf(f_out, ";%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%", io_u_dist[0], io_u_dist[1], io_u_dist[2], io_u_dist[3], io_u_dist[4], io_u_dist[5], io_u_dist[6]);
 
-       fprintf(f_out, "%3.1f%%,%3.1f%%,%3.1f%%,%3.1f%%,%3.1f%%,%3.1f%%\n", io_u_lat[0], io_u_lat[1], io_u_lat[2], io_u_lat[3], io_u_lat[4], io_u_lat[5]);
-       fprintf(f_out, "%3.1f%%,%3.1f%%,%3.1f%%,%3.1f%%,%3.1f%%", io_u_lat[6], io_u_lat[7], io_u_lat[8], io_u_lat[9], io_u_lat[10]);
+       fprintf(f_out, ";%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%\n", io_u_lat[0], io_u_lat[1], io_u_lat[2], io_u_lat[3], io_u_lat[4], io_u_lat[5]);
+       fprintf(f_out, ";%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%", io_u_lat[6], io_u_lat[7], io_u_lat[8], io_u_lat[9], io_u_lat[10]);
 
        if (ts->description)
-               fprintf(f_out, ",%s", ts->description);
+               fprintf(f_out, ";%s", ts->description);
 
        fprintf(f_out, "\n");
 }