client and stat patches
cover client and stat patches
From: Vincent Fu <[email protected]>
Jens, please consider these two patches that address an output issue when fio runs jobs on servers and a style issue with the patch from last week.
Vincent
Vincent Fu (2):
client: put All clients section at end of normal output
stat: eliminate unneeded curly braces
client.c | 6 +++++- stat.c | 11 +++++------ 2 files changed, 10 insertions(+), 7 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/2 client: put All clients section at end of normal output
From: Vincent Fu <[email protected]>
When fio runs multiple jobs on servers, it is possible for the "All clients" output to appear in the middle of output for the individual jobs. This patch puts the "All clients" output into a separate buffer and displays it after the output for all the individual jobs.
--- client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
client.c +5 -1
@@ -59,6 +59,7 @@ struct group_run_stats client_gs;int sum_stat_clients;static int sum_stat_nr; +static struct buf_output allclients;static struct json_object *root =NULL ;static struct json_object *job_opt_object =NULL ;static struct json_array *clients_array =NULL ;
@@ -1103,7 +1104,7 @@ static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd)if (++sum_stat_nr == sum_stat_clients) {strcpy (client_ts.name,"All clients" ); - tsobj =show_thread_status (&client_ts, &client_gs,NULL , &client->buf); + tsobj =show_thread_status (&client_ts, &client_gs,NULL , &allclients);if (tsobj) {json_object_add_client_info (tsobj, client);json_array_add_value_object (clients_array, tsobj);
@@ -2129,6 +2130,9 @@ int fio_handle_clients(struct client_ops *ops) } } +log_info_buf (allclients.buf, allclients.buflen); +buf_output_free (&allclients); +fio_client_json_fini ();free (pfds);
Signature · 1 line
2.17.1
PATCH 2/2 stat: eliminate unneeded curly braces
In reply to [email protected]From: Vincent Fu <[email protected]>
--- stat.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
stat.c +5 -6
@@ -1682,15 +1682,14 @@ void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src, dst->io_u_submit[k] += src->io_u_submit[k]; dst->io_u_complete[k] += src->io_u_complete[k]; } -for (k =0 ; k <FIO_IO_U_LAT_N_NR ; k++) { + +for (k =0 ; k <FIO_IO_U_LAT_N_NR ; k++) dst->io_u_lat_n[k] += src->io_u_lat_n[k]; - } -for (k =0 ; k <FIO_IO_U_LAT_U_NR ; k++) { +for (k =0 ; k <FIO_IO_U_LAT_U_NR ; k++) dst->io_u_lat_u[k] += src->io_u_lat_u[k]; - } -for (k =0 ; k <FIO_IO_U_LAT_M_NR ; k++) { +for (k =0 ; k <FIO_IO_U_LAT_M_NR ; k++) dst->io_u_lat_m[k] += src->io_u_lat_m[k]; - } +for (k =0 ; k <FIO_IO_U_PLAT_NR ; k++) dst->io_u_sync_plat[k] += src->io_u_sync_plat[k];
Signature · 1 line
2.17.1
Quoted 5 lines · On 3/25/19 8:20 AM, [email protected] wrote:
From: Vincent Fu <[email protected]>
Jens, please consider these two patches that address an output issue when fio runs jobs on servers and a style issue with the patch from last week.
Looks good, the all clients buffered and at the end makes sense.
Signature · 1 line
Jens Axboe