-
Notifications
You must be signed in to change notification settings - Fork 1.2k
frame-omni-bencher maintenance #5466
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b35d2d2
Maintenance
ggwpez 176ca5a
Add PrDoc (auto generated)
ggwpez f2b1ed9
Fix --heap-pages ignored on node
ggwpez 2e542aa
fix
ggwpez 1a4a8df
lockfile
ggwpez 5f58b95
Clippy
ggwpez 813b048
format prdoc
ggwpez 0edba50
Format markdown
ggwpez e5ff9f4
Merge branch 'master' into oty-omni-bencher
ggwpez 4c05e62
prdoc
ggwpez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| crates: | ||
| - bump: minor | ||
| name: frame-omni-bencher | ||
| doc: | ||
| - audience: Runtime Dev | ||
| description: "Changes:\r\n- Set default level to `Info` again. Seems like a dependency\ | ||
| \ update set it to something higher.\r\n- Fix docs to not use `--locked` since\ | ||
| \ we rely on dependency bumps via cargo.\r\n- Add README with rust docs." | ||
|
||
| title: frame-omni-bencher maintenance | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # Polkadot Omni Benchmarking CLI | ||
|
|
||
| The Polkadot Omni benchmarker allows to benchmark the extrinsics of any Polkadot runtime. It is | ||
| meant to replace the current manual integration of the `benchmark pallet` into every parachain node. | ||
| This reduces duplicate code and makes maintenance for builders easier. The CLI is currently only | ||
| able to benchmark extrinsics. In the future it is planned to extend this to some other areas. | ||
|
|
||
| General FRAME runtimes could also be used with this benchmarker, as long as they don't utilize any | ||
| host functions that are not part of the Polkadot host specification. | ||
|
|
||
| ## Installation | ||
|
|
||
| Directly via crates.io: | ||
|
|
||
| ```sh | ||
| cargo install frame-omni-bencher --profile=production | ||
| ``` | ||
|
|
||
| from GitHub: | ||
|
|
||
| ```sh | ||
| cargo install --git https://github.com/paritytech/polkadot-sdk frame-omni-bencher --profile=production | ||
| ``` | ||
|
|
||
| or locally from the sources: | ||
|
|
||
| ```sh | ||
| cargo install --path substrate/utils/frame/omni-bencher --profile=production | ||
| ``` | ||
|
|
||
| Check the installed version and print the docs: | ||
|
|
||
| ```sh | ||
| frame-omni-bencher --help | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| First we need to ensure that there is a runtime available. As example we will build the Westend | ||
| runtime: | ||
|
|
||
| ```sh | ||
| cargo build -p westend-runtime --profile production --features runtime-benchmarks | ||
| ``` | ||
|
|
||
| Now as an example, we benchmark the `balances` pallet: | ||
|
|
||
| ```sh | ||
| frame-omni-bencher v1 benchmark pallet \ | ||
| --runtime target/release/wbuild/westend-runtime/westend-runtime.compact.compressed.wasm \ | ||
| --pallet "pallet_balances" --extrinsic "" | ||
| ``` | ||
|
|
||
| The `--steps`, `--repeat`, `--heap-pages` and `--wasm-execution` arguments have sane defaults and do not need be passed explicitly anymore. | ||
|
|
||
| ## Backwards Compatibility | ||
|
|
||
| The exposed pallet sub-command is identical as the node-integrated CLI. The only difference is that | ||
| it needs to be prefixed with a `v1` to ensure drop-in compatibility. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.