mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 05:11:02 +00:00
Fix output file for updating weights in run_benches_for_runtime.sh (#5906)
This commit is contained in:
@@ -29,6 +29,12 @@ rm -f $ERR_FILE
|
|||||||
for PALLET in "${PALLETS[@]}"; do
|
for PALLET in "${PALLETS[@]}"; do
|
||||||
echo "[+] Benchmarking $PALLET for $runtime";
|
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=$(
|
OUTPUT=$(
|
||||||
./target/production/polkadot benchmark pallet \
|
./target/production/polkadot benchmark pallet \
|
||||||
--chain="${runtime}-dev" \
|
--chain="${runtime}-dev" \
|
||||||
@@ -39,7 +45,7 @@ for PALLET in "${PALLETS[@]}"; do
|
|||||||
--execution=wasm \
|
--execution=wasm \
|
||||||
--wasm-execution=compiled \
|
--wasm-execution=compiled \
|
||||||
--header=./file_header.txt \
|
--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
|
if [ $? -ne 0 ]; then
|
||||||
echo "$OUTPUT" >> "$ERR_FILE"
|
echo "$OUTPUT" >> "$ERR_FILE"
|
||||||
|
|||||||
Reference in New Issue
Block a user