Repository navigation
ci: hot-path performance gate (instruction counts) and wall-clock A/B - #270
Draft
unbalancedparentheses wants to merge 4 commits into
Draft
unbalancedparentheses wants to merge 4 commits into
unbalancedparentheses wants to merge 4 commits into
Conversation
This branch has not been deployed
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.
What and why
The 0.8 release gate found async burst −37% and default
request()−24% against main, by hand, on fede. This adds a check that catches that class of regression on every PR touching the hot path.benchmarks/hotpath/driver.rs: one portable driver (#[actor]handlers,request(),send()only, so it builds on any recent revision).hotpath.pycopies the head's driver into both trees, so base and head run the same workload.benchmarks/hotpath.py gate(CI): instructions per operation under callgrind, at 2,000 and 6,000 operations (differenced, so process start and setup cancel), median of 3, head vs merge base. Fails if any benchmark grows more than 3% (--threshold,HOTPATH_THRESHOLDin the workflow). Per-benchmark table in the job summary.request(), 16-taskrequest(),sendfrom 1 and 2 producers: identical counts run to run) and threads-mode sequentialrequest()(within 0.5% on fede, 0.9% on the runner). Multi-thread runtimes and free-running OS-thread producers vary up to ±20% in instructions from run to run, so threads-mode burst/send and the multi-thread async variants are wall-clock only.benchmarks/hotpath.py abba(manual, pre-release): wall-clock ABBA A/B on fixed cores, median and range; added to the release checklist..github/workflows/perf-gate.yml: on every PR andmerge_group, but it only builds and measures whenconcurrency/src,rt/src,macros/srcor the driver changed; otherwise it passes with a "skipped" summary, so it can be a required check (apaths:filter would leave a required check pending).How it was verified
Self-test on fede (nice 19).
main vs main (two runs), all PASS: every async benchmark 0.0% (spread ±0),
threads_request_seq+0.1% / +0.2%. Same on the GitHub runner (this PR's ownperf-gaterun): async 0.0%, threads −0.9%.#240 head
7f716152vs main0791ace5: FAIL, exit 1:async_ct_burstasync_ct_request_seqasync_ct_request_conc16async_ct_send_p1async_ct_send_p2threads_request_seqLimit: instruction counts miss contention, wake-ups and cache-line traffic, so the wall-clock A/B stays a release step (docs/TESTING.md, "Performance gate").