Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions scripts/benchmark_all_pallets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

# Create `WeightInfo` implementations for all the pallets and store it in the weight module of the `runtime`.

RUNTIME_WEIGHT_DIR=runtime/src/weights
NODE=./target/release/integritee-node
NODE=${1:-target/release/integritee-node}
CHAIN_SPEC=${2:-integritee-solo-fresh}
WEIGHT_OUTPUT_DIR=${3:-runtime/src/weights}

mkdir -p $RUNTIME_WEIGHT_DIR
echo "Running benchmarks for all pallets:"
echo "NODE: ${NODE}"
echo "CHAIN_SPEC: ${CHAIN_SPEC}"
echo "WEIGHT_OUTPUT_DIR: ${WEIGHT_OUTPUT_DIR}"

mkdir -p "$WEIGHT_OUTPUT_DIR"

pallets=(
"frame_system" \
Expand All @@ -24,14 +30,14 @@ for pallet in ${pallets[*]}; do

$NODE \
benchmark \
--chain=integritee-solo-fresh \
--chain="$CHAIN_SPEC" \
--steps=50 \
--repeat=20 \
--pallet="$pallet" \
--extrinsic="*" \
--execution=wasm \
--wasm-execution=compiled \
--heap-pages=4096 \
--output=./$RUNTIME_WEIGHT_DIR/"$pallet".rs \
--output="$WEIGHT_OUTPUT_DIR"/"$pallet".rs \

done