Crates.io | frame-omni-bencher |
lib.rs | frame-omni-bencher |
version | 0.7.0 |
source | src |
created_at | 2024-04-08 17:02:17.406742 |
updated_at | 2024-10-01 10:39:52.677334 |
description | Freestanding benchmark runner for any Polkadot runtime. |
homepage | |
repository | https://github.com/paritytech/polkadot-sdk.git |
max_upload_size | |
id | 1200631 |
size | 244,726 |
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.
Directly via crates.io:
cargo install frame-omni-bencher --profile=production
from GitHub:
cargo install --git https://github.com/paritytech/polkadot-sdk frame-omni-bencher --profile=production
or locally from the sources:
cargo install --path substrate/utils/frame/omni-bencher --profile=production
Check the installed version and print the docs:
frame-omni-bencher --help
First we need to ensure that there is a runtime available. As example we will build the Westend runtime:
cargo build -p westend-runtime --profile production --features runtime-benchmarks
Now as an example, we benchmark the balances
pallet:
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.
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.
Polkadot SDK stable2409