client/server: enable "All clients" latency percentiles
authorVincent Fu <vincent.fu@samsung.com>
Thu, 3 Oct 2024 19:25:33 +0000 (19:25 +0000)
committerVincent Fu <vincent.fu@samsung.com>
Thu, 3 Oct 2024 19:25:33 +0000 (19:25 +0000)
The ?lat_percentile toggles and list of percentiles to report from the
thread_stat payload have not been propagated to the overall summary
report. Enable "All clients" latency percentile reporting by arbitrarily
using the toggles and percentile list from the first thread_stat
payload sent from the server.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
client.c

index 5964faba04104484022897793b46cd03eab3c96c..d6d54663e93257456de629f1fa3d992f9c79339e 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1128,6 +1128,16 @@ static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd)
        sum_thread_stats(&client_ts, &p->ts);
        sum_group_stats(&client_gs, &p->rs);
 
+       if (!client_ts.members) {
+               /* Arbitrarily use the percentile toggles and percentile list
+                * from the first thread_stat that comes our way */
+               client_ts.slat_percentiles = p->ts.slat_percentiles;
+               client_ts.clat_percentiles = p->ts.clat_percentiles;
+               client_ts.lat_percentiles = p->ts.lat_percentiles;
+
+               for (int i = 0; i < FIO_IO_U_LIST_MAX_LEN; i++)
+                       client_ts.percentile_list[i] = p->ts.percentile_list[i];
+       }
        client_ts.members++;
        client_ts.thread_number = p->ts.thread_number;
        client_ts.groupid = p->ts.groupid;