benchmarking/locust: harvest server-side telemetry from Prometheus - #1725
Open
Nishanth Kotla (Nishanth29) wants to merge 3 commits into
Open
Nishanth Kotla (Nishanth29) wants to merge 3 commits into
Nishanth Kotla (Nishanth29) wants to merge 3 commits into
Conversation
Nishanth Kotla (Nishanth29)
force-pushed
the
benchmarking/server-telemetry
branch
from
September 18, 2026 19:34
bb6d09b to
659e8f2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1590
Note
Stacked on #1723. Until #1723 merges into
main, GitHub displays both commits in the overall diff. To review only the 5 files changed in this PR, click commitbb6d09b9.What this PR does
Locust measures the client side only. This adds a post-run harvest of server-side ground truth from Prometheus, written to a new
server_summary.jsonand summarized as one row instats.jsonl.Proposed Changes
Steady-state scoping
server_telemetry.pyderives the steady-state window fromstats_history.csv, taking the first sample at 90% of peak user count as the window start, and scopes its queries to that range so ramp-up does not skew the results.Harvested metrics
Cluster packing, from
ate_workerpool_workers: assigned workers over total workers, reported as min, p50, p90, p99, max and mean (avg), plus the underlying timeseries so transient spikes remain visible.Host kernel pressure, from cAdvisor PSI: CPU, memory and IO stall percentages, each as the same percentile set over the window.
Snapshots: sizes at p50/p90/p95 and mean, checkpoint counts both in-window and cumulative, restore and checkpoint latency at p50/p95 from the AteomHerder RPC histograms, and checkpoint throughput as
checkpoint_mb_s.Constraints and failure behavior
The module uses only the standard library, since the locust image is distroless, and every request carries a timeout. An unreachable Prometheus records nulls and does not fail the run.
--prometheus-urloverrides the in-cluster default.Unmeasured fields are
nulland a measured zero is0, consistent with the rest of the runner. Prometheus exposes no byte counter on the restore path, so no restore throughput field is emitted rather than deriving one indirectly.Output
server_summary.jsonholds the full nested artifact.stats.jsonlreceives a singleserver_summaryrow with the flat subset intended for graphing: the three packing percentiles, the three PSI p90s,snapshot_size_p50_mb,checkpoints_in_window,restore_p50_s,checkpoint_p50_sandcheckpoint_mb_s.status.jsonis unchanged.How this was tested
11 unit tests in
test_server_telemetry.pycovering steady-state detection, percentile boundaries, the range-query window guard, malformed Prometheus responses, the packing and checkpoint arithmetic, a missing denominator returning null, snapshot fields returning null rather than zero, and telemetry surviving a missing stats CSV.Verified against live Prometheus on a benchmark cluster. Every emitted value was re-derived by hand from the raw queries and matched. A run with
--prometheus-urlpointed at an unreachable address completes normally with the affected fields null.References
Agent Substrate: Actor Density Benchmark Specs