mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 16:31:07 +00:00
benchmarking-cli: add --list-pallets and --all options (#3395)
closes #2844 - adds `list-pallets` option which prints all unique available pallets for benchmarking ```bash ./target/release/node benchmark pallet --list=pallets ``` - adds `all` option which runs benchmarks for all available pallets and extrinsics (equivalent to `--pallet * --extrinsic *`) ```bash ./target/release/node benchmark pallet --all ``` - use the `list=pallets` syntax in `run_all_benchmarks.sh` script cc ggwpez --------- Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -59,11 +59,12 @@ done
|
||||
if [ "$skip_build" != true ]
|
||||
then
|
||||
echo "[+] Compiling Substrate benchmarks..."
|
||||
cargo build --profile=production --locked --features=runtime-benchmarks --bin substrate
|
||||
cargo build --profile=production --locked --features=runtime-benchmarks --bin substrate-node
|
||||
fi
|
||||
|
||||
# The executable to use.
|
||||
SUBSTRATE=./target/production/substrate
|
||||
# Parent directory because of the monorepo structure.
|
||||
SUBSTRATE=../target/production/substrate-node
|
||||
|
||||
# Manually exclude some pallets.
|
||||
EXCLUDED_PALLETS=(
|
||||
@@ -80,11 +81,7 @@ EXCLUDED_PALLETS=(
|
||||
|
||||
# Load all pallet names in an array.
|
||||
ALL_PALLETS=($(
|
||||
$SUBSTRATE benchmark pallet --list --chain=dev |\
|
||||
tail -n+2 |\
|
||||
cut -d',' -f1 |\
|
||||
sort |\
|
||||
uniq
|
||||
$SUBSTRATE benchmark pallet --list=pallets --no-csv-header --chain=dev
|
||||
))
|
||||
|
||||
# Filter out the excluded pallets by concatenating the arrays and discarding duplicates.
|
||||
|
||||
Reference in New Issue
Block a user