From 312b4af22018a73a445ae6ecf640d71f12120ab9 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 13 Oct 2011 13:11:42 +0200 Subject: [PATCH] Add IOPS to terse output 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 --- HOWTO | 4 ++-- fio.1 | 4 ++-- init.c | 2 +- stat.c | 16 ++++++++++------ 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/HOWTO b/HOWTO index 2e4cdbdf..11ade8c1 100644 --- 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 0517e33f..0cf12fc4 100644 --- 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 e8fef21e..485efc9f 100644 --- 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 83ffd069..f399e912 100644 --- 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) -- 2.25.1