[codex] fold math microbenchmark into rust_api_benchmarking#846
Draft
MilkBlock wants to merge 1 commit intoegraphs-good:mainfrom
Draft
[codex] fold math microbenchmark into rust_api_benchmarking#846MilkBlock wants to merge 1 commit intoegraphs-good:mainfrom
MilkBlock wants to merge 1 commit intoegraphs-good:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #846 +/- ##
==========================================
+ Coverage 86.26% 86.31% +0.05%
==========================================
Files 85 85
Lines 23262 23262
==========================================
+ Hits 20067 20079 +12
+ Misses 3195 3183 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance
Comparing Footnotes
|
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.
Summary
This change folds the Rust-rule math microbenchmark into the existing
rust_api_benchmarkingbench suite so it runs alongside the other Rust API hot-path benchmarks instead of living in a separate bench target.It also cleans up the shared benchmark support by making
run_math_microbenchmark_itershonor itsitersparameter and by failing fast when Rust-rule registration itself fails during setup.Root cause
The math microbenchmark had been added as a standalone
[[bench]], which meant it was disconnected from the upstream Rust API benchmarking entrypoint that now carries the table-action hot-path cases. That made it harder to compare and maintain these Rust API microbenchmarks together.The support helper also hard-coded eight iterations regardless of the caller input, which made the API misleading and hid issues in tests that expected to control iteration count.
Fix
The math support module is now imported directly by
benches/rust_api_benchmarking.rs, and a newrust_rule_math_microbenchmarkdivan bench is registered there.A small test file exercises the setup path and one benchmark iteration, including the case where the global Rayon pool has already been initialized.
Validation
cargo test --test rust_api_math_microbenchmark -- --nocapturecargo bench --bench rust_api_benchmarking -- --list