* [PATCH 0/2] client and stat patches
@ 2019-03-25 14:20 vincentfu
2019-03-25 14:20 ` [PATCH 1/2] client: put All clients section at end of normal output vincentfu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: vincentfu @ 2019-03-25 14:20 UTC (permalink / raw)
To: axboe, fio; +Cc: Vincent Fu
From: Vincent Fu <vincent.fu@wdc.com>
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(-)
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] client: put All clients section at end of normal output 2019-03-25 14:20 [PATCH 0/2] client and stat patches vincentfu @ 2019-03-25 14:20 ` vincentfu 2019-03-25 14:20 ` [PATCH 2/2] stat: eliminate unneeded curly braces vincentfu 2019-03-25 14:23 ` [PATCH 0/2] client and stat patches Jens Axboe 2 siblings, 0 replies; 4+ messages in thread From: vincentfu @ 2019-03-25 14:20 UTC (permalink / raw) To: axboe, fio; +Cc: Vincent Fu From: Vincent Fu <vincent.fu@wdc.com> 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(-) diff --git a/client.c b/client.c index 8d7c0331..4cbffb62 100644 --- a/client.c +++ b/client.c @@ -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); -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] stat: eliminate unneeded curly braces 2019-03-25 14:20 [PATCH 0/2] client and stat patches vincentfu 2019-03-25 14:20 ` [PATCH 1/2] client: put All clients section at end of normal output vincentfu @ 2019-03-25 14:20 ` vincentfu 2019-03-25 14:23 ` [PATCH 0/2] client and stat patches Jens Axboe 2 siblings, 0 replies; 4+ messages in thread From: vincentfu @ 2019-03-25 14:20 UTC (permalink / raw) To: axboe, fio; +Cc: Vincent Fu From: Vincent Fu <vincent.fu@wdc.com> --- stat.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/stat.c b/stat.c index ecef1099..2bc21dad 100644 --- a/stat.c +++ b/stat.c @@ -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]; -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] client and stat patches 2019-03-25 14:20 [PATCH 0/2] client and stat patches vincentfu 2019-03-25 14:20 ` [PATCH 1/2] client: put All clients section at end of normal output vincentfu 2019-03-25 14:20 ` [PATCH 2/2] stat: eliminate unneeded curly braces vincentfu @ 2019-03-25 14:23 ` Jens Axboe 2 siblings, 0 replies; 4+ messages in thread From: Jens Axboe @ 2019-03-25 14:23 UTC (permalink / raw) To: vincentfu, fio; +Cc: Vincent Fu On 3/25/19 8:20 AM, vincentfu@gmail.com wrote: > From: Vincent Fu <vincent.fu@wdc.com> > > 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. -- Jens Axboe ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-25 14:23 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-03-25 14:20 [PATCH 0/2] client and stat patches vincentfu 2019-03-25 14:20 ` [PATCH 1/2] client: put All clients section at end of normal output vincentfu 2019-03-25 14:20 ` [PATCH 2/2] stat: eliminate unneeded curly braces vincentfu 2019-03-25 14:23 ` [PATCH 0/2] client and stat patches Jens Axboe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox