Fix client/server "all clients" reporting
authorJeff Furlong <jeff.furlong@wdc.com>
Wed, 3 Jan 2018 23:20:38 +0000 (23:20 +0000)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Jan 2018 19:00:49 +0000 (12:00 -0700)
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 <axboe@kernel.dk>
client.c
gclient.c
init.c
server.c
stat.c

index 18247ef6b9bd277c0e66a980b3a49679aa4f1173..6fe6d9f6b4cdceb0f699f7a9c5830e79b6491464 100644 (file)
--- 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.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");
 
        if (++sum_stat_nr == sum_stat_clients) {
                strcpy(client_ts.name, "All clients");
index ab7aa10d061c3600c75fb51a2aaf7206e97f1833..70dda48385e7548fac350bb3cf712339f5f9b056 100644 (file)
--- 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.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");
 
        if (++sum_stat_nr == sum_stat_clients) {
                strcpy(client_ts.name, "All clients");
diff --git a/init.c b/init.c
index decd3b4e051c3c3cffdd4e66fa39bb37243da5df..8a80138394cfdf81689f23f3f057c653874b3b86 100644 (file)
--- 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.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;
 
        for (i = 0; i < DDIR_RWDIR_CNT; i++) {
                td->ts.clat_stat[i].min_val = ULONG_MAX;
index 54d703d0b056f1b02a6baaf3d4e95011d3f0543e..ce9dca315ef19b1a7793b10203b0860470c9f54b 100644 (file)
--- 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->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 cc171a4d52ff69dab7df15037a7b89996e05ecaa..509bd6d8ed3d2ed0273ed17a9f25cc72e242ed03 100644 (file)
--- 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;
                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,
 }
 
 void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src,