Skip to content

Commit 144be21

Browse files
committed
initial script
1 parent 8389088 commit 144be21

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/benchmark-weights.yml

Whitespace-only changes.

scripts/benchmark_all.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
3+
# List of pallets you want to benchmark
4+
pallets=("admin-utils", "collective", "commitments", "registry", "subtensor")
5+
6+
# Chain spec and output directory
7+
chain_spec="dev" # or your specific chain spec
8+
9+
for pallet in "${pallets[@]}"
10+
do
11+
echo "Benchmarking $pallet..."
12+
cargo run --profile=production --features=runtime-benchmarks -- benchmark pallet \
13+
--chain $chain_spec \
14+
--execution=wasm \
15+
--wasm-execution=compiled \
16+
--pallet $pallet \
17+
--extrinsic '*' \
18+
--steps 50 \
19+
--repeat 20 \
20+
--output "pallets/$pallet/src/$pallet.rs" \
21+
--template ./.maintain/frame-weight-template.hbs # Adjust this path to your template file
22+
done
23+
24+
echo "All pallets have been benchmarked and weights updated."

0 commit comments

Comments
 (0)