X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=client.c;h=7fdae2babad7b6f9894b59852a3350aff3c0a5a1;hb=9899aff3e345;hp=1879e4478e5d6bcf1926c42b026b7176af195bb8;hpb=3bcb9d945bf8859cfcca50a2899b1af6ae849c02;p=fio.git diff --git a/client.c b/client.c index 1879e447..7fdae2ba 100644 --- a/client.c +++ b/client.c @@ -60,7 +60,6 @@ static int sum_stat_nr; static struct json_object *root = NULL; static struct json_array *clients_array = NULL; static struct json_array *du_array = NULL; -static int do_output_all_clients; #define FIO_CLIENT_HASH_BITS 7 #define FIO_CLIENT_HASH_SZ (1 << FIO_CLIENT_HASH_BITS) @@ -150,7 +149,7 @@ void fio_put_client(struct fio_client *client) free(client->files); if (!client->did_stat) - sum_stat_clients -= client->nr_stat; + sum_stat_clients--; free(client); } @@ -895,7 +894,7 @@ static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd) json_array_add_value_object(clients_array, tsobj); } - if (!do_output_all_clients) + if (sum_stat_clients <= 1) return; sum_thread_stats(&client_ts, &p->ts, sum_stat_nr); @@ -1155,12 +1154,8 @@ static void handle_start(struct fio_client *client, struct fio_net_cmd *cmd) client->state = Client_started; client->jobs = le32_to_cpu(pdu->jobs); - client->nr_stat = le32_to_cpu(pdu->stat_outputs); - if (sum_stat_clients > 1) - do_output_all_clients = 1; - - sum_stat_clients += client->nr_stat; + sum_stat_clients++; } static void handle_stop(struct fio_client *client, struct fio_net_cmd *cmd)