Skip to content
Snippets Groups Projects
Commit bbe228a1 authored by Mak's avatar Mak Committed by GitHub
Browse files

Fix output file for updating weights in run_benches_for_runtime.sh (#5906)

parent 872c87e8
No related merge requests found
......@@ -29,6 +29,12 @@ rm -f $ERR_FILE
for PALLET in "${PALLETS[@]}"; do
echo "[+] Benchmarking $PALLET for $runtime";
output_file=""
if [[ $PALLET == *"::"* ]]; then
# translates e.g. "pallet_foo::bar" to "pallet_foo_bar"
output_file="${PALLET//::/_}.rs"
fi
OUTPUT=$(
./target/production/polkadot benchmark pallet \
--chain="${runtime}-dev" \
......@@ -39,7 +45,7 @@ for PALLET in "${PALLETS[@]}"; do
--execution=wasm \
--wasm-execution=compiled \
--header=./file_header.txt \
--output="./runtime/${runtime}/src/weights/${PALLET/::/_}.rs" 2>&1
--output="./runtime/${runtime}/src/weights/${output_file}" 2>&1
)
if [ $? -ne 0 ]; then
echo "$OUTPUT" >> "$ERR_FILE"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment