Skip to content

Commit 28edcea

Browse files
authored
Benchmark script update (#1537)
* Benchmark script update * Adjustment
1 parent 68580de commit 28edcea

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

scripts/run_benchmarks.sh

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,22 @@ for chain in ${chains//,/ }; do
136136
--heap-pages=4096
137137
)
138138

139-
# Run benchmarks & generate the weight file as JSON.
140-
OUTPUT=$(
141-
"${BASE_COMMAND[@]}" --json-file="$JSON_WEIGHT_FILE" 2>&1
142-
)
143-
if [ $? -ne 0 ]; then
144-
echo "$OUTPUT" >> "$ERR_FILE"
145-
echo "[-] Failed to benchmark $PALLET. Error written to $ERR_FILE; continuing..."
146-
continue
147-
fi
139+
# TODO: Uncomment and reuse output once benchmark command is updated to correctly calculate PoV
140+
# using JSON file as the input. At the moment of updating this script, it doesn't work properly.
141+
# Once it's fixed, return the '--json-input' to the commands below.
142+
#
143+
# # Run benchmarks & generate the weight file as JSON.
144+
# OUTPUT=$(
145+
# "${BASE_COMMAND[@]}" --json-file="$JSON_WEIGHT_FILE" 2>&1
146+
# )
147+
# if [ $? -ne 0 ]; then
148+
# echo "$OUTPUT" >> "$ERR_FILE"
149+
# echo "[-] Failed to benchmark $PALLET. Error written to $ERR_FILE; continuing..."
150+
# continue
151+
# fi
148152

149153
OUTPUT=$(
150154
"${BASE_COMMAND[@]}" \
151-
--json-input="$JSON_WEIGHT_FILE" \
152155
--output="$PALLET_WEIGHT_FILE" \
153156
--template=./scripts/templates/pallet-weight-template.hbs 2>&1
154157
)
@@ -159,7 +162,6 @@ for chain in ${chains//,/ }; do
159162

160163
OUTPUT=$(
161164
"${BASE_COMMAND[@]}" \
162-
--json-input="$JSON_WEIGHT_FILE" \
163165
--output="$RUNTIME_WEIGHT_FILE" \
164166
--template=./scripts/templates/runtime-weight-template.hbs 2>&1
165167
)

0 commit comments

Comments
 (0)