Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Benchmarking: Add pov_mode to V2 syntax #3616

Merged
merged 13 commits into from
Mar 19, 2024
Merged

Benchmarking: Add pov_mode to V2 syntax #3616

merged 13 commits into from
Mar 19, 2024

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Mar 7, 2024

Changes:

  • Port the pov_mode attribute from the V1 syntax to V2
  • Update pallet-whitelist and frame-benchmarking-pallet-pov

Follow up: also allow this attribute on top-level benchmark modules.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez
Copy link
Member Author

ggwpez commented Mar 7, 2024

bot bench substrate-pallet --pallet=frame_benchmarking_pallet_pov

@command-bot
Copy link

command-bot bot commented Mar 7, 2024

@ggwpez https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5469399 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=frame_benchmarking_pallet_pov. 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 3-36ec3a2f-a95d-48e4-adda-4d6d29efbbba to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Mar 7, 2024

@ggwpez Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=frame_benchmarking_pallet_pov has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5469399 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5469399/artifacts/download.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez added T1-FRAME This PR/Issue is related to core FRAME, the framework. T12-benchmarks This PR/Issue is related to benchmarking and weights. labels Mar 8, 2024
ggwpez added 5 commits March 8, 2024 16:26
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez
Copy link
Member Author

ggwpez commented Mar 8, 2024

bot bench substrate-pallet --pallet=pallet_whitelist

@ggwpez ggwpez marked this pull request as ready for review March 8, 2024 15:51
@ggwpez ggwpez requested a review from a team as a code owner March 8, 2024 15:51
@command-bot
Copy link

command-bot bot commented Mar 8, 2024

@ggwpez https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5475514 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_whitelist. 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-d881c0fb-7fc8-40fc-b8f8-b690dd651376 to cancel this command or bot cancel to cancel all commands in this pull request.

Comment on lines +134 to +135
#[derive(Debug, Clone)]
struct PovModeAttr {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit I would move the definition before the impl, I find it easier to scroll through the file this way

Comment on lines +97 to +102
let _ = || -> Result<()> {
let content;
syn::braced!(content in input);
maybe_content = Some(content);
Ok(())
}();
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you need to return a Result here?

Copy link
Member Author

Choose a reason for hiding this comment

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

The syn::braced! macro just does a return 🙈
Its internally using parse_braces, but that is private IIUC.

…=dev --target_dir=substrate --pallet=pallet_whitelist
@command-bot
Copy link

command-bot bot commented Mar 8, 2024

@ggwpez Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_whitelist has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5475514 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5475514/artifacts/download.

@gupnik gupnik self-requested a review March 12, 2024 14:04
Copy link
Contributor

@gupnik gupnik left a comment

Choose a reason for hiding this comment

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

Could we add some UI tests?

ggwpez added 2 commits March 14, 2024 16:36
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez self-assigned this Mar 15, 2024
@ggwpez
Copy link
Member Author

ggwpez commented Mar 15, 2024

bot update-ui

@command-bot
Copy link

command-bot bot commented Mar 15, 2024

@ggwpez https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5547896 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/update-ui/update-ui.sh". 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 4-a19d11a6-b477-4c6b-8176-40f6a82f7550 to cancel this command or bot cancel to cancel all commands in this pull request.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@command-bot
Copy link

command-bot bot commented Mar 15, 2024

@ggwpez Command "$PIPELINE_SCRIPTS_DIR/commands/update-ui/update-ui.sh" has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5547896 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5547896/artifacts/download.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez added this pull request to the merge queue Mar 19, 2024
Merged via the queue into master with commit abd3f0c Mar 19, 2024
131 of 132 checks passed
@ggwpez ggwpez deleted the oty-bench-v2-pov-mode branch March 19, 2024 12:08
dharjeezy pushed a commit to dharjeezy/polkadot-sdk that referenced this pull request Mar 24, 2024
Changes:
- Port the `pov_mode` attribute from the V1 syntax to V2
- Update `pallet-whitelist` and `frame-benchmarking-pallet-pov`

Follow up: also allow this attribute on top-level benchmark modules.

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
T1-FRAME This PR/Issue is related to core FRAME, the framework. T12-benchmarks This PR/Issue is related to benchmarking and weights.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants