From 3449ab8c4d2addb716105ded698438a1d3811572 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 14 Sep 2012 23:35:08 +0200 Subject: [PATCH] Default to terse version 3 4 will include the trim output, and we'll augment that with json output as well. To avoid breaking anyone who's using the git pulls for their testing, we'll default to version 3 for now. Signed-off-by: Jens Axboe --- README | 2 +- init.c | 3 ++- stat.c | 15 +++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README b/README index c629e2db..a1350170 100644 --- a/README +++ b/README @@ -126,7 +126,7 @@ $ fio --bandwidth-log Generate per-job bandwidth logs --minimal Minimal (terse) output --version Print version info and exit - --terse-version=type Terse version output format (default 3, or 2). + --terse-version=type Terse version output format (default 3, or 2 or 4). --help Print this page --cmdhelp=cmd Print command help, "all" for all of them --enghelp=engine Print ioengine help, or list available ioengines diff --git a/init.c b/init.c index 1840c8f8..54ee1db6 100644 --- a/init.c +++ b/init.c @@ -1440,7 +1440,8 @@ int parse_cmd_line(int argc, char *argv[]) break; case 'V': terse_version = atoi(optarg); - if (!(terse_version == 2 || terse_version == 3)) { + if (!(terse_version == 2 || terse_version == 3) || + (terse_version == 4)) { log_err("fio: bad terse version format\n"); exit_val = 1; do_exit++; diff --git a/stat.c b/stat.c index e29bf0c1..4e00177b 100644 --- a/stat.c +++ b/stat.c @@ -738,10 +738,8 @@ static void show_thread_status_terse_v2(struct thread_stat *ts, log_info("\n"); } -#define FIO_TERSE_VERSION "3" - -static void show_thread_status_terse_v3(struct thread_stat *ts, - struct group_run_stats *rs) +static void show_thread_status_terse_v3_v4(struct thread_stat *ts, + struct group_run_stats *rs, int ver) { double io_u_dist[FIO_IO_U_MAP_NR]; double io_u_lat_u[FIO_IO_U_LAT_U_NR]; @@ -750,14 +748,15 @@ static void show_thread_status_terse_v3(struct thread_stat *ts, int i; /* General Info */ - log_info("%s;%s;%s;%d;%d", FIO_TERSE_VERSION, fio_version_string, + log_info("%s;%s;%s;%d;%d", ver, fio_version_string, ts->name, ts->groupid, ts->error); /* Log Read Status */ show_ddir_status_terse(ts, rs, DDIR_READ); /* Log Write Status */ show_ddir_status_terse(ts, rs, DDIR_WRITE); /* Log Trim Status */ - show_ddir_status_terse(ts, rs, DDIR_TRIM); + if (ver == 4) + show_ddir_status_terse(ts, rs, DDIR_TRIM); /* CPU Usage */ if (ts->total_run_time) { @@ -809,8 +808,8 @@ static void show_thread_status_terse(struct thread_stat *ts, { if (terse_version == 2) show_thread_status_terse_v2(ts, rs); - else if (terse_version == 3) - show_thread_status_terse_v3(ts, rs); + else if (terse_version == 3 || terse_version == 4) + show_thread_status_terse_v3_v4(ts, rs, terse_version); else log_err("fio: bad terse version!? %d\n", terse_version); } -- 2.25.1