-
Notifications
You must be signed in to change notification settings - Fork 16
fix(divan_compat): do not capture drop with perf #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(divan_compat): do not capture drop with perf #118
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes performance measurement accuracy by moving the BenchGuard
to only capture the actual benchmark execution time, excluding the overhead from input/output dropping operations.
- Removed the global
BenchGuard
that was capturing the entire benchmarking loop including drop operations - Added localized
BenchGuard
instances around the core timing sections to measure only the benchmark execution - Added a test benchmark to demonstrate the issue with large input drops
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
crates/divan_compat/divan_fork/src/bench/mod.rs | Moved BenchGuard placement from outer loop to inner timing sections to exclude drop overhead |
crates/divan_compat/benches/drop_example.rs | Added test benchmark with large input that has expensive drop to verify the fix |
crates/divan_compat/Cargo.toml | Added bench configuration for the new drop_example benchmark |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CodSpeed WallTime Performance ReportMerging #118 will degrade performances by 16.49%Comparing Summary
Benchmarks breakdown
|
CodSpeed Instrumentation Performance ReportMerging #118 will degrade performances by 6.78%Comparing Summary
Benchmarks breakdown
|
8943507
to
8b522b2
Compare
b02554d
to
b21bf84
Compare
Closing in favor of #121 |
No description provided.