@@ -14,7 +14,7 @@ shopt -s inherit_errexit
1414. " $( dirname " ${BASH_SOURCE[0]} " ) /utils.sh"
1515. " $( dirname " ${BASH_SOURCE[0]} " ) /cmd_runner.sh"
1616
17- cargo_run_benchmarks=" cargo +nightly run --quiet --profile=production"
17+ cargo_run_benchmarks=" cargo +nightly run --locked -- quiet --profile=production"
1818repository=" $( basename " $PWD " ) "
1919
2020bench_pallet_common_args=(
@@ -94,23 +94,17 @@ bench_pallet() {
9494 fi
9595 local weights_dir=" ./runtime/${runtime_dir} /src/weights"
9696
97- local output_file=" "
98- if [[ $pallet == * " ::" * ]]; then
99- # translates e.g. "pallet_foo::bar" to "pallet_foo_bar"
100- output_file=" ${pallet//::/ _} .rs"
101- fi
102-
10397 case " $kind " in
10498 runtime)
10599 args+=(
106100 --header=./file_header.txt
107- --output=" ${weights_dir} /${output_file} "
101+ --output=" ${weights_dir} /"
108102 )
109103 ;;
110104 xcm)
111105 args+=(
112106 --template=./xcm/pallet-xcm-benchmarks/template.hbs
113- --output=" ${weights_dir} /xcm/${output_file} "
107+ --output=" ${weights_dir} /xcm/"
114108 )
115109 ;;
116110 * )
@@ -132,23 +126,17 @@ bench_pallet() {
132126 --header=./file_header.txt
133127 )
134128
135- local output_file=" "
136- if [[ $pallet == * " ::" * ]]; then
137- # translates e.g. "pallet_foo::bar" to "pallet_foo_bar"
138- output_file=" ${pallet//::/ _} .rs"
139- fi
140-
141129 case " $kind " in
142130 pallet)
143131 args+=(
144- --output=" ./parachains/runtimes/$chain_type /$runtime /src/weights/${output_file} "
132+ --output=" ./parachains/runtimes/$chain_type /$runtime /src/weights/"
145133 )
146134 ;;
147135 xcm)
148136 mkdir -p " ./parachains/runtimes/$chain_type /$runtime /src/weights/xcm"
149137 args+=(
150138 --template=./templates/xcm-bench-template.hbs
151- --output=" ./parachains/runtimes/$chain_type /$runtime /src/weights/xcm/${output_file} "
139+ --output=" ./parachains/runtimes/$chain_type /$runtime /src/weights/xcm/"
152140 )
153141 ;;
154142 * )
0 commit comments