From 18aa1998aa8267b8a127b3fe53e58a68b4e99469 Mon Sep 17 00:00:00 2001 From: Jeff Furlong Date: Wed, 3 Jan 2018 23:20:38 +0000 Subject: [PATCH] Fix client/server "all clients" reporting In commit e883cb3501de0f99297282c18842d50aaa7fa531, the default significant figures was added. The default value was preserved for local jobs and when client/server was used if jobs=1, but not when client/server was used if jobs > 1. This patch restores some reporting outputs ("all clients" output for IOPS and BW) when client/server is used if > 1 jobs, for example: OLD: All clients: (groupid=0, jobs=2): err= 0: pid=0: Wed Jan 3 14:30:13 2018 read: IOPS=0, BW=0 (0)(0B/5001msec) <--ZERO VALUES slat (nsec): min=762, max=108579, avg=1058.97, stdev=221.30 clat (nsec): min=254, max=4544.2k, avg=11297.64, stdev=8284.14 lat (usec): min=9, max=4545, avg=12.41, stdev= 8.30 bw ( KiB/s): min=290192, max=347160, per=49.35%, avg=303613.33, stdev=11582.87, samples=18 iops : min=72548, max=86790, avg=75903.33, stdev=2895.72, samples=18 NEW: All clients: (groupid=0, jobs=2): err= 0: pid=0: Wed Jan 3 15:08:33 2018 read: IOPS=147k, BW=575Mi (603M)(2876MiB/5001msec) <--CORRECT VALUES slat (nsec): min=841, max=61945, avg=1304.83, stdev=232.75 clat (nsec): min=544, max=4487.2k, avg=11736.68, stdev=9123.64 lat (usec): min=10, max=4489, avg=13.10, stdev= 9.13 bw ( KiB/s): min=260945, max=305976, per=49.99%, avg=294350.22, stdev=9192.53, samples=18 iops : min=65236, max=76494, avg=73587.56, stdev=2298.13, samples=18 Regards, Jeff Signed-off-by: Jens Axboe --- client.c | 1 + gclient.c | 1 + init.c | 1 + server.c | 1 + stat.c | 2 ++ 5 files changed, 6 insertions(+) diff --git a/client.c b/client.c index 18247ef6..6fe6d9f6 100644 --- a/client.c +++ b/client.c @@ -1024,6 +1024,7 @@ static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd) client_ts.thread_number = p->ts.thread_number; client_ts.groupid = p->ts.groupid; client_ts.unified_rw_rep = p->ts.unified_rw_rep; + client_ts.sig_figs = p->ts.sig_figs; if (++sum_stat_nr == sum_stat_clients) { strcpy(client_ts.name, "All clients"); diff --git a/gclient.c b/gclient.c index ab7aa10d..70dda483 100644 --- a/gclient.c +++ b/gclient.c @@ -298,6 +298,7 @@ static void gfio_thread_status_op(struct fio_client *client, client_ts.members++; client_ts.thread_number = p->ts.thread_number; client_ts.groupid = p->ts.groupid; + client_ts.sig_figs = p->ts.sig_figs; if (++sum_stat_nr == sum_stat_clients) { strcpy(client_ts.name, "All clients"); diff --git a/init.c b/init.c index decd3b4e..8a801383 100644 --- a/init.c +++ b/init.c @@ -1472,6 +1472,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, td->ts.lat_percentiles = o->lat_percentiles; td->ts.percentile_precision = o->percentile_precision; memcpy(td->ts.percentile_list, o->percentile_list, sizeof(o->percentile_list)); + td->ts.sig_figs = o->sig_figs; for (i = 0; i < DDIR_RWDIR_CNT; i++) { td->ts.clat_stat[i].min_val = ULONG_MAX; diff --git a/server.c b/server.c index 54d703d0..ce9dca31 100644 --- a/server.c +++ b/server.c @@ -1443,6 +1443,7 @@ static void convert_gs(struct group_run_stats *dst, struct group_run_stats *src) dst->unit_base = cpu_to_le32(src->unit_base); dst->groupid = cpu_to_le32(src->groupid); dst->unified_rw_rep = cpu_to_le32(src->unified_rw_rep); + dst->sig_figs = cpu_to_le32(src->sig_figs); } /* diff --git a/stat.c b/stat.c index cc171a4d..509bd6d8 100644 --- a/stat.c +++ b/stat.c @@ -1490,6 +1490,8 @@ void sum_group_stats(struct group_run_stats *dst, struct group_run_stats *src) dst->kb_base = src->kb_base; if (!dst->unit_base) dst->unit_base = src->unit_base; + if (!dst->sig_figs) + dst->sig_figs = src->sig_figs; } void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src, -- 2.25.1