Skip to content

Commit

Permalink
Add all_clients_active_average_throughput_tx/s and all_clients_active…
Browse files Browse the repository at this point in the history
…_write_fraction to basicperf stats
  • Loading branch information
achamayou committed Aug 9, 2023
1 parent 963d496 commit 0ed4686
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/infra/basicperf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0ed4686

Please sign in to comment.