Add IOPS to terse output
authorJens Axboe <axboe@kernel.dk>
Thu, 13 Oct 2011 11:11:42 +0000 (13:11 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Oct 2011 11:11:42 +0000 (13:11 +0200)
Bump the terse version format. There will be a few more changes
until version 3 is final, but since it's already changed now,
flag it as a different version. Consider this terse version 3 alpha.

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

diff --git a/HOWTO b/HOWTO
index 2e4cdbdf146e17394a8ebcd481097e43846131ba..11ade8c1a500440f27d1774257ef0c9754020877 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -1362,13 +1362,13 @@ Split up, the format is as follows:
 
        version, jobname, groupid, error
        READ status:
-               Total IO (KB), bandwidth (KB/sec), runtime (msec)
+               Total IO (KB), bandwidth (KB/sec), IOPS, runtime (msec)
                Submission latency: min, max, mean, deviation
                Completion latency: min, max, mean, deviation
                Total latency: min, max, mean, deviation
                Bw: min, max, aggregate percentage of total, mean, deviation
        WRITE status:
-               Total IO (KB), bandwidth (KB/sec), runtime (msec)
+               Total IO (KB), bandwidth (KB/sec), IOPS, runtime (msec)
                Submission latency: min, max, mean, deviation
                Completion latency: min, max, mean, deviation
                Total latency: min, max, mean, deviation
diff --git a/fio.1 b/fio.1
index 0517e33fa87e698c4ee08f6dc2eeeacedf7d9127..0cf12fc4da2c8d7409e0435c5931f34d4aeb14bf 100644 (file)
--- a/fio.1
+++ b/fio.1
@@ -1104,7 +1104,7 @@ change.  The fields are:
 .P
 Read status:
 .RS
-.B Total I/O \fR(KB)\fP, bandwidth \fR(KB/s)\fP, runtime \fR(ms)\fP
+.B Total I/O \fR(KB)\fP, bandwidth \fR(KB/s)\fP, IOPS, runtime \fR(ms)\fP
 .P
 Submission latency:
 .RS
@@ -1126,7 +1126,7 @@ Bandwidth:
 .P
 Write status:
 .RS
-.B Total I/O \fR(KB)\fP, bandwidth \fR(KB/s)\fP, runtime \fR(ms)\fP
+.B Total I/O \fR(KB)\fP, bandwidth \fR(KB/s)\fP, IOPS, runtime \fR(ms)\fP
 .P
 Submission latency:
 .RS
diff --git a/init.c b/init.c
index e8fef21edf567e645fef1d95a5cc83c532ba9d7b..485efc9f641a59047d540910a4af30afd6efab38 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1322,7 +1322,7 @@ int parse_cmd_line(int argc, char *argv[])
                        break;
                case 'V':
                        terse_version = atoi(optarg);
-                       if (terse_version != 2) {
+                       if (terse_version != 3) {
                                log_err("fio: bad terse version format\n");
                                exit_val = 1;
                                do_exit++;
diff --git a/stat.c b/stat.c
index 83ffd0690afca59cc6d1ff266bd717ff70d9395e..f399e912c2196717574fada5f6554bcfbdad4c2d 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -558,16 +558,20 @@ static void show_ddir_status_terse(struct thread_stat *ts,
                                   struct group_run_stats *rs, int ddir)
 {
        unsigned long min, max;
-       unsigned long long bw;
+       unsigned long long bw, iops;
        double mean, dev;
 
        assert(ddir_rw(ddir));
 
-       bw = 0;
-       if (ts->runtime[ddir])
-               bw = ts->io_bytes[ddir] / ts->runtime[ddir];
+       iops = bw = 0;
+       if (ts->runtime[ddir]) {
+               uint64_t runt = ts->runtime[ddir];
+
+               bw = ts->io_bytes[ddir] / runt;
+               iops = (1000 * (uint64_t) ts->total_io_u[ddir]) / runt;
+       }
 
-       log_info(";%llu;%llu;%llu", ts->io_bytes[ddir] >> 10, bw,
+       log_info(";%llu;%llu;%llu;%llu", ts->io_bytes[ddir] >> 10, bw, iops,
                                                        ts->runtime[ddir]);
 
        if (calc_lat(&ts->slat_stat[ddir], &min, &max, &mean, &dev))
@@ -594,7 +598,7 @@ static void show_ddir_status_terse(struct thread_stat *ts,
                log_info(";%lu;%lu;%f%%;%f;%f", 0UL, 0UL, 0.0, 0.0, 0.0);
 }
 
-#define FIO_TERSE_VERSION      "2"
+#define FIO_TERSE_VERSION      "3"
 
 static void show_thread_status_terse(struct thread_stat *ts,
                                     struct group_run_stats *rs)