Skip to content

Commit 7c6ea6b

Browse files
bench-bot: fix output file location
1 parent eeac721 commit 7c6ea6b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

bench-bot.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,23 +125,24 @@ bench_pallet() {
125125
"${bench_pallet_common_args[@]}"
126126
--pallet="$pallet"
127127
--chain="${runtime}-dev"
128+
--json-file="${ARTIFACTS_DIR}/bench.json"
129+
--header=./file_header.txt
128130
)
129131

132+
# translates e.g. "pallet_foo::bar" to "pallet_foo_bar"
133+
local output_file="${pallet//::/_}"
134+
130135
case "$kind" in
131136
pallet)
132137
args+=(
133-
--json-file="${ARTIFACTS_DIR}/bench.json"
134-
--header=./file_header.txt
135-
--output="./parachains/runtimes/$chain_type/$runtime/src/weights"
138+
--output="./parachains/runtimes/$chain_type/$runtime/src/weights/${output_file}.rs"
136139
)
137140
;;
138141
xcm)
139142
mkdir -p "./parachains/runtimes/$chain_type/$runtime/src/weights/xcm"
140143
args+=(
141144
--template=./templates/xcm-bench-template.hbs
142-
--json-file="${ARTIFACTS_DIR}/bench.json"
143-
--header=./file_header.txt
144-
--output="./parachains/runtimes/$chain_type/$runtime/src/weights/xcm"
145+
--output="./parachains/runtimes/$chain_type/$runtime/src/weights/xcm/${output_file}.rs"
145146
)
146147
;;
147148
*)

0 commit comments

Comments
 (0)