From 0ed4686137c0188107413552b0fa9da97c4821ab Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Wed, 9 Aug 2023 10:30:27 +0000 Subject: [PATCH] Add all_clients_active_average_throughput_tx/s and all_clients_active_write_fraction to basicperf stats --- tests/infra/basicperf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/infra/basicperf.py b/tests/infra/basicperf.py index fd371fbe8991..6faff6297f8a 100644 --- a/tests/infra/basicperf.py +++ b/tests/infra/basicperf.py @@ -488,6 +488,14 @@ def table(): "all_clients_active_percentage" ] = all_clients_active_percentage statistics["total_duration_s"] = duration_s + + agg_all_active = agg.filter(pl.col("sendTime") > latest_start).filter(pl.col("receiveTime") < earliest_end) + all_active_duration_s = (earliest_end - latest_start).total_seconds() + all_active_throughput = len(agg_all_active) / duration_s + statistics["all_clients_active_average_throughput_tx/s"] = all_active_throughput + writes = len(agg_all_active.filter(pl.col("request").bin.starts_with(b"PUT "))) + statistics["all_clients_active_write_fraction"] = writes / len(agg_all_active) + statistics_path = os.path.join(network.common_dir, "statistics.json") with open(statistics_path, "w") as f: json.dump(statistics, f, indent=2)