Skip to content

Commit

Permalink
refactor: ♻️ update deprecated options in both invocations of the com…
Browse files Browse the repository at this point in the history
…mand within the script
  • Loading branch information
manuelmauro committed Jan 17, 2025
1 parent b3b4509 commit aeecd0d
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions scripts/run-benches-for-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ cargo build --profile=$profile --locked --features=runtime-benchmarks

# Load all pallet names in an array.
PALLETS=($(
./target/${profile}/moonbeam benchmark pallet --list --chain="${runtime}-dev" |\
tail -n+2 |\
cut -d',' -f1 |\
sort |\
uniq
./target/${profile}/moonbeam benchmark pallet \
--list \
--runtime="./target/${profile}/wbuild/${runtime}-runtime/${runtime}_runtime.wasm" \
--genesis-builder=runtime \
--genesis-builder-preset=development |\
tail -n+2 |\
cut -d',' -f1 |\
sort |\
uniq
))

echo "[+] Benchmarking ${#PALLETS[@]} pallets for runtime $runtime with $profile profile"
Expand All @@ -39,17 +43,17 @@ for PALLET in "${PALLETS[@]}"; do

OUTPUT=$(
./target/${profile}/moonbeam benchmark pallet \
--runtime="./target/${profile}/wbuild/${runtime}-runtime/${runtime}_runtime.wasm" \
--genesis-builder=runtime \
--genesis-builder-preset=development \
--steps=50 \
--repeat=20 \
--pallet="$PALLET" \
--extrinsic="*" \
--wasm-execution=compiled \
--header=./file_header.txt \
--template=./benchmarking/frame-weight-template.hbs \
--output="./runtime/${output}/src/weights/${output_file}" 2>&1
--runtime="./target/${profile}/wbuild/${runtime}-runtime/${runtime}_runtime.wasm" \
--genesis-builder=runtime \
--genesis-builder-preset=development \
--steps=50 \
--repeat=20 \
--pallet="$PALLET" \
--extrinsic="*" \
--wasm-execution=compiled \
--header=./file_header.txt \
--template=./benchmarking/frame-weight-template.hbs \
--output="./runtime/${output}/src/weights/${output_file}" 2>&1
)
if [ $? -ne 0 ]; then
echo "$OUTPUT" >> "$ERR_FILE"
Expand Down

0 comments on commit aeecd0d

Please sign in to comment.