Skip to content
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

Migrating polkadot-runtime-parachains configuration benchmarking to V2 #6607

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Krayt78
Copy link
Contributor

@Krayt78 Krayt78 commented Nov 21, 2024

Description

Migrating polkadot-runtime-parachains configuration benchmarking to the new benchmarking syntax v2.
This is a part of #6202

#[benchmark]
fn set_config_with_block_number() -> Result<(), BenchmarkError> {
#[extrinsic_call]
set_code_retention_period(RawOrigin::Root, One::one());
Copy link
Contributor

Choose a reason for hiding this comment

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

This function (as well as set_max_code_size below) returns a Result, so that may be an Error. If you want the benchmarking function to return Result<(), BenchmarkError>, you should propagate the error from here. Otherwise, if the benchmarking function has an empty return type, you can assert_ok!(...) on the output of this function. Same below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah i see that they return a DispatchResult. How would one go to propagate the error from inside a extrinsic call?
Since those benchmarks previously didnt verify anything after the extrinsic call maybe the best call would be to just remove the return value ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, maybe it's better to remove the return value at this point since it's not really used

@re-gius re-gius added R0-silent Changes should not be mentioned in any release notes T2-pallets This PR/Issue is related to a particular pallet. T12-benchmarks This PR/Issue is related to benchmarking and weights. labels Dec 10, 2024
@Krayt78 Krayt78 requested a review from re-gius December 11, 2024 10:41
@paritytech paritytech deleted a comment from command-bot bot Dec 11, 2024
@paritytech paritytech deleted a comment from command-bot bot Dec 11, 2024
@re-gius
Copy link
Contributor

re-gius commented Dec 11, 2024

bot bench cumulus-assets --runtime=asset-hub-westend --pallet=polkadot_runtime_parachains

@command-bot
Copy link

command-bot bot commented Dec 11, 2024

@re-gius https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7904252 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=asset-hub-westend --runtime_dir=assets --target_dir=cumulus --pallet=polkadot_runtime_parachains. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 2-b4b72088-3afd-47b1-af21-392a8a3b4dd4 to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Dec 11, 2024

@re-gius Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=asset-hub-westend --runtime_dir=assets --target_dir=cumulus --pallet=polkadot_runtime_parachains has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7904252 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7904252/artifacts/download.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes T2-pallets This PR/Issue is related to a particular pallet. T12-benchmarks This PR/Issue is related to benchmarking and weights.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants