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

Feat/benchmarks refactor #160

Merged
merged 10 commits into from Feb 9, 2024
Merged

Feat/benchmarks refactor #160

merged 10 commits into from Feb 9, 2024

Conversation

lrazovic
Copy link
Contributor

@lrazovic lrazovic commented Feb 6, 2024

This PR lays the groundwork for properly benchmarking our runtime.

  • We've included all pallets that contain a WeightInfo config parameter within the define_benchmarks! macro. This inclusion allows us to start the benchmark using the node compiled with the runtime-benchmarks feature.
  • The just command for executing the benchmarks has been made generic to the pallet's name. For instance, executing just benchmark-runtime pallet-proxy allows us to benchmark pallet-proxy. Any pallet that is part of the define_benchmarks! macro can be benchmarked using this command.

Curious to see which pallets/extrinsic we can run benchmarks of? cargo run --features runtime-benchmarks --release benchmark pallets --list --chain=base-polkadot

@lrazovic lrazovic changed the title Feat/elections benchmarks Feat/benchmarks refactor Feb 6, 2024
@@ -254,7 +257,15 @@ fn base_testnet_genesis(
council: Default::default(),
technical_committee: Default::default(),
democracy: Default::default(),
elections: Default::default(),
elections: ElectionsConfig {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A genesis config is required to start the benchmarks.

@lrazovic lrazovic self-assigned this Feb 6, 2024
@lrazovic lrazovic marked this pull request as ready for review February 6, 2024 17:01
Copy link
Contributor

@JuaniRios JuaniRios left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@vstam1 vstam1 left a comment

Choose a reason for hiding this comment

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

LGTM

@JuaniRios JuaniRios merged commit 3cadd6a into main Feb 9, 2024
@JuaniRios JuaniRios deleted the feat/elections-benchmarks branch February 9, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants