Repository navigation
perf(bench): exempt audio_mix/buffering_add_one_tick from the 1.10 ratio (#3138) - #3153
Merged
Merged
Conversation
) #3138 decided option 1: the pair is one extern "C" shim on a once-per-audio-tick call at ~46 ns against the C's ~39 ns, with no hot spot left after #3141, so the Rust/C ratio bound does not apply to it (the 5% full-app bound of #142 still does). The three cases the exemption must satisfy: the entry names the pair, its measured cost, the machine and the issue; an exempt pair is not a breach; and the pair stays in the report with its ratio. Fails on this commit: record.BOUND_EXEMPTIONS does not exist and summarize still marks the pair over the bound.
…tio (#3138) #3138 decided option 1: name the pair in record.py's BOUND_EXEMPTIONS with its measured absolute cost, the machine and the issue, instead of adding a push_ts_front fast path to the FFI layer. - over_bound() skips an exempt pair by name, so --max-ratio no longer fails on it; every other pair keeps the gate. - summarize() keeps the row and marks it exempt rather than over the bound, so the report still carries its ratio and absolute numbers. - The report records the exemption list, and the gate prints each exempt pair above the bound with its reason. - docs/rust-port/release-criteria.md documents --max-ratio and the list. Tests: 19 in ci/test_benchmark_record.py pass (three RED cases plus the gate print/exit paths).
Member
Author
|
Handed off to the coordinator.
|
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.
Carries out the maintainer's
Decided:on #3138: option 1 — exemptaudio_mix/buffering_add_one_tickfrom the 1.10 Rust/C ratio by name in therecorder, with the absolute cost and the reason recorded, and no
push_ts_frontfast path in the FFI layer.RED —
d321093daci/test_benchmark_record.pygains the three cases the exemption must satisfy:the entry names the pair, its measured cost, the machine and the issue; an
exempt pair is not a breach; and the pair stays in the report with its ratio.
The existing over-bound case moves to
audio_mix/mix_whole_tick, because thepair it used is now exempt by decision.
Fails on that commit:
GREEN —
44cdd7f94record.pygainsBOUND_EXEMPTIONS, one named entry per pair with themeasured absolute cost, the machine and the deciding issue (perf: audio_mix/buffering_add_one_tick is 1.19-1.30x the C, above the 1.10x bound #3138).
over_bound()skips an exempt pair by name, so--max-rationo longerfails on it; every other pair keeps the gate.
summarize()keeps the row and labels itexempt from 110% bound (#3138)instead of
over …, so the report still carries its ratio and absolutenumbers;
pair_status()is the one place that decides the label.bound_exemptions, and the gate prints each exempt pairabove the bound with its reason (it is measured, not dropped).
docs/rust-port/release-criteria.mddocuments--max-ratioand the list.The 5% full-app recording bound of #142 still applies to this pair, and
#3141's--max-ratiogate still covers every other pair — both conditionsfrom the decision.
Evidence
uv run rust/tools/benchmarks/record.py --cpu 7 --category audio_mix --repeats 3 --max-ratio 1.10on this host (Ryzen 7 3700X, shared box, loaded), exit 0:
The other 11
audio_mixpairs are within the bound (0.27x–0.99x) and the runstill exits non-zero if any non-exempt pair goes over (covered by
test_the_gate_still_fails_every_other_breach).Checks
uv run python -m unittest ci/test_benchmark_record.py— 19 tests, OK../lint—lane lint: ok (187.6 s).Refs #3138