feat(benchmarking): record sweperf in-sandbox execution time - #1892
Open
Haowei Cai (Roy) (roycaihw) wants to merge 1 commit into
Open
Haowei Cai (Roy) (roycaihw) wants to merge 1 commit into
Haowei Cai (Roy) (roycaihw) wants to merge 1 commit into
Conversation
The sweperf boomer times each cycle as Workload_Cycle_<n> from the client side: POST /execute, then polling GET /status?job_id= every 200ms until the job completes. That number includes routing, request handling and poll granularity, so it cannot be compared with a run of the same trace outside Substrate, and cannot separate sandbox overhead from harness overhead. replay.py already reports the time it spent running the trace steps as execution_duration_ms in the /status reply (gke-labs/sweperf c30c0d6). Parse it, and record it under the same name with request type "replay", next to the existing "http" entry, so locust shows both side by side and the stats CSV/JSONL carry http_Workload_Cycle_<n> and replay_Workload_Cycle_<n>. Servers built before c30c0d6 do not send the field; nothing extra is recorded for them.
Author
Contributor
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.
Related: #1694
Workload_Cycle_<n>is timed on the client:POST /execute, then pollingGET /status?job_id=every 200 ms. That time includes routing, requesthandling and poll granularity, so it can't be compared with the same trace run
outside Substrate, and it can't separate sandbox overhead from harness overhead.
replay.py already reports
execution_duration_ms(gke-labs/sweperfc30c0d6).This PR parses it and records it under the same name with request type
replay, next to the existinghttpentry:httpWorkload_Cycle_3replayWorkload_Cycle_3The stats CSV/JSONL then carry both
http_Workload_Cycle_<n>andreplay_Workload_Cycle_<n>. Servers older thanc30c0d6don't send the field,and nothing extra is recorded for them. Note that locust's "Aggregated" row now
includes the
replayentries as well.pollJobCompletionnow returns the final status (it returned onlyerrorbefore); its caller and tests are updated.
go test ./internal/benchmarking/boomer/sweperf/; new casescover a raw replay.py reply, a missing field, and negative, zero and
fractional values)