-
Notifications
You must be signed in to change notification settings - Fork 765
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
Update benchmarking macros #3934
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.
Fine once we re-run the substrate benches. Thanks!
@@ -1077,15 +1077,13 @@ mod tests { | |||
(frame_benchmarking::BenchmarkParameter::v, v), | |||
(frame_benchmarking::BenchmarkParameter::n, n), | |||
]; | |||
let closure_to_benchmark = |
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.
can this test be removed, it should be executed when running the benchmark tests anyway ?
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.
Yea looks a bit weird.
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.
ah nvm it's marked as #[extra]
so I guess this is to ensure the test runs everytime..
bot help |
Here's a link to docs |
bot bench-all substrate |
@pgherveou https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5730507 was started for your command Comment |
@pgherveou Command |
37ff3c0
to
a560470
Compare
bot bench-all substrate |
@pgherveou |
bot cancel 2-0444d85c-3a2b-4901-aa42-5e499a58ce60 |
@pgherveou Command |
bot bench-all substrate |
@pgherveou https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5737796 was started for your command Comment |
@pgherveou https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5822874 was started for your command Comment |
@pgherveou Command |
bot bench-all substrate |
@ggwpez https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5831222 was started for your command Comment |
@ggwpez Command |
@bkontur @acatangiu can I get a +1 from one of view for the bridge review lock? |
@pgherveou could you just revert the change in the bridges folder please ? I think it's just noise. It looks like it wouldn't make a difference. But it would create conflicts for our migration PR: #4024 |
@serban300 I just fixed the constant because the tests were failing, how is that calculated? |
Oh ok. I'm not sure how it's calculated. But we can keep it if it's needed for the test to pass. |
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.
The bridges change looks ok.
Current benchmarking macro returns a closure with the captured benchmarked code.
This can cause issues when the benchmarked code has complex lifetime requirements.
This PR updates the existing macro by injecting the recording parameter and invoking the start / stop method around the benchmarked block instead of returning a closure
One other added benefit is that you can write this kind of code now as well:
Weights compare link