Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Use define_benchmarks! #4760

Merged
merged 2 commits into from
Jan 21, 2022
Merged

Use define_benchmarks! #4760

merged 2 commits into from
Jan 21, 2022

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Jan 21, 2022

paritytech/substrate#10592 made it possible to reduce the combination of add_benchmark+list_benchmark to just one define_benchmarks.
This MR refactors the code to use it.

Same as in Cumulus paritytech/cumulus#926

@ reviewers

  • The rialto-parachain runtime config somehow has no list_benchmark (nor benchmark_metadata) call, only add.
  • The correctness of this change can be verified by listing all benchmarks: cargo run --features=runtime-benchmarks -- benchmark --chain=westend-dev --pallet="*" --extrinsic="*" --list for the chain specs: westend, rococo, polkadot, kusama but I could not test it for rialto, rialto-parachains and millau .

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@ggwpez ggwpez added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels Jan 21, 2022
@ggwpez ggwpez requested a review from acatangiu as a code owner January 21, 2022 11:01
@ggwpez ggwpez self-assigned this Jan 21, 2022
@ggwpez ggwpez added the I8-refactor Code needs refactoring. label Jan 21, 2022
Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rialto-parachain runtime config somehow has no list_benchmark (nor benchmark_metadata) call, only add.

I think it is fine to just ping someone from the bridge team and let them update to the new syntax if/when they wish.

@ggwpez
Copy link
Member Author

ggwpez commented Jan 21, 2022

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 3e74d66 into master Jan 21, 2022
@paritytech-processbot paritytech-processbot bot deleted the oty-define-benchmarks branch January 21, 2022 17:12
Wizdave97 pushed a commit to ComposableFi/polkadot that referenced this pull request Feb 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. I8-refactor Code needs refactoring.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants