Skip to content

Commit

Permalink
initial script
Browse files Browse the repository at this point in the history
  • Loading branch information
sam0x17 committed Aug 13, 2024
1 parent 8389088 commit 144be21
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Empty file.
24 changes: 24 additions & 0 deletions scripts/benchmark_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

# List of pallets you want to benchmark
pallets=("admin-utils", "collective", "commitments", "registry", "subtensor")

# Chain spec and output directory
chain_spec="dev" # or your specific chain spec

for pallet in "${pallets[@]}"
do
echo "Benchmarking $pallet..."
cargo run --profile=production --features=runtime-benchmarks -- benchmark pallet \
--chain $chain_spec \
--execution=wasm \
--wasm-execution=compiled \
--pallet $pallet \
--extrinsic '*' \
--steps 50 \
--repeat 20 \
--output "pallets/$pallet/src/$pallet.rs" \
--template ./.maintain/frame-weight-template.hbs # Adjust this path to your template file
done

echo "All pallets have been benchmarked and weights updated."

0 comments on commit 144be21

Please sign in to comment.