File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff 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 * )
You can’t perform that action at this time.
0 commit comments