Repository navigation
perf(bench): gate retrieve_data in perf_ir (LAB-12133) - #153
Conversation
Adds retrieve_data/<size> at the storage sizes (40 B to 1 MiB) on the same envelope as retrieve, with budgets on rustc 1.98.1 and valgrind 3.22.0. A second caller keeps decode_envelope out of line under fat LTO, which moves retrieve by about 70 Ir/op at small sizes, so its budgets are re-recorded with --allow-increase. The README says why.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 14 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Adds
retrieve_data/<size>cases to theperf_irinstruction-count gate, now thatByteStorage::retrieve_datais onmain(#146). They run at the storage sizesretrieveuses (40 B, 64 B, 1 KiB, 64 KiB, 1 MiB), on the same envelope, so the two read paths are measured side by side.Budgets
Recorded on x86_64 Linux, rustc 1.98.1 and valgrind 3.22.0, the toolchain the committed set was taken on. Every other case measures exactly at its committed budget on this toolchain, so the instrument matches the recorded one.
retrieve_dataretrieve(new budget)retrieve(old budget)Page faults: 0 per 1,000 ops at 64 KiB and 1 MiB for both.
Why
retrieve's budgets go upThe bench is built with fat LTO, so the cases in one binary shape each other's code. On
main,retrieveis the only caller ofdecode_envelope, and LLVM inlines it intoretrieve: the symbol is absent from the bench binary. Withretrieve_dataas a second caller,decode_envelopeis emitted once, out of line, and both call it. Measured onmainwithout this change,retrieveis 2,569 / 2,561 / 7,332 Ir/op at 40 B / 64 B / 1 KiB (+0.35% over budget at 40 B, the figure #146's CI reported). With this change it is 2,637 / 2,630 / 7,409: the second caller costsretrieve68 to 77 Ir/op (+2.6% at 40 B), with the library code unchanged.This is a change to the instrument, not a library regression, so
retrieve's five budgets are re-recorded with--allow-increase. The README's "Instruction counts" section says so, so the next reader does not chase it. A consumer that calls only one of the two read functions gets the decode inlined.Verification
make perf-ir-vs-base(the CI form, baseorigin/main): PASS, every caseok,retrieve_data/*measured on the base too.make perf-iragainst the committed budgets: no FAIL.store/*reports LOWER on this host (store/40533 against a budget of 1,186), on this PR and onmainalike. It is left alone here.cargo fmt --checkandcargo clippy --features encryption --benches -D warningspass.Docs
README "Instruction counts": the case table lists
retrieve_data/<size>, the size paragraph names it, and a note covers the LTO coupling above.Closes LAB-12133