Skip to content

Commit

Permalink
fix: update benchmarking script with new syntax and naming issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ntn-x2 committed Jun 23, 2022
1 parent 3db25ae commit 61a2708
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
12 changes: 6 additions & 6 deletions scripts/run_benches_for_pallets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ pallets=(
parachain-staking
)

echo "[+] Running all benchmarks for $runtime --chain=$chain"
echo "[+] Running all default weight benchmarks for $runtime --chain=$chain"

cargo build $standard_args
# cargo build $standard_args

for pallet in "${pallets[@]}"; do
echo "Runtime: $runtime. Pallet: $pallet";
# shellcheck disable=SC2086
./target/release/kilt-parachain benchmark \
./target/release/kilt-parachain benchmark pallet \
--chain="${chain}" \
--steps=50 \
--repeat=20 \
--steps=1 \
--repeat=1 \
--pallet="$pallet" \
--extrinsic="*" \
--execution=wasm \
--wasm-execution=compiled \
--heap-pages=4096 \
--output="./pallets/${pallet}/src/default_weights.rs" \
--output="./pallets/${pallet/_/-}/src/default_weights.rs" \
--template=".maintain/weight-template.hbs"
done
43 changes: 22 additions & 21 deletions scripts/run_benches_for_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,43 @@ pallets=(
ctype
delegation
did
frame-system
pallet-balances
pallet-collective
pallet-democracy
pallet-did-lookup
pallet-indices
pallet-inflation
pallet-membership
pallet-preimage
pallet-proxy
pallet-scheduler
pallet-session
pallet-timestamp
pallet-tips
pallet-treasury
pallet-utility
pallet-vesting
pallet-web3-names
parachain-staking
frame_system
pallet_balances
pallet_collective
pallet_democracy
pallet_indices
pallet_membership
pallet_preimage
pallet_proxy
pallet_scheduler
pallet_session
pallet_timestamp
pallet_tips
pallet_treasury
pallet_utility
pallet_vesting
)

echo "[+] Running all benchmarks for $runtime --chain=$chain"
echo "[+] Running all runtime benchmarks for $runtime --chain=$chain"

# cargo build $standard_args

cargo build $standard_args
for pallet in "${pallets[@]}"; do
echo "Runtime: $runtime. Pallet: $pallet";
# shellcheck disable=SC2086
./target/release/kilt-parachain benchmark \
./target/release/kilt-parachain benchmark pallet \
--chain="${chain}" \
--steps=50 \
--repeat=20 \
--steps=1 \
--repeat=1 \
--pallet="$pallet" \
--extrinsic="*" \
--execution=wasm \
--wasm-execution=compiled \
--heap-pages=4096 \
--output="./runtimes/${runtime}/src/weights/${pallet}.rs" \
--output="./runtimes/${runtime}/src/weights/${pallet/-/_}.rs" \
--template=".maintain/runtime-weight-template.hbs"
done

0 comments on commit 61a2708

Please sign in to comment.