From 6d3b6200167b1afe0c8501d24ab810c16ce23474 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 23 Sep 2022 12:46:06 +0200 Subject: [PATCH 1/2] Only use folder name for --output Signed-off-by: Oliver Tale-Yazdi --- bench-bot.sh | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/bench-bot.sh b/bench-bot.sh index c46888b..6f5c747 100755 --- a/bench-bot.sh +++ b/bench-bot.sh @@ -94,23 +94,17 @@ bench_pallet() { fi local weights_dir="./runtime/${runtime_dir}/src/weights" - local output_file="" - if [[ $pallet == *"::"* ]]; then - # translates e.g. "pallet_foo::bar" to "pallet_foo_bar" - output_file="${pallet//::/_}.rs" - fi - case "$kind" in runtime) args+=( --header=./file_header.txt - --output="${weights_dir}/${output_file}" + --output="${weights_dir}/" ) ;; xcm) args+=( --template=./xcm/pallet-xcm-benchmarks/template.hbs - --output="${weights_dir}/xcm/${output_file}" + --output="${weights_dir}/xcm/" ) ;; *) @@ -132,23 +126,17 @@ bench_pallet() { --header=./file_header.txt ) - local output_file="" - if [[ $pallet == *"::"* ]]; then - # translates e.g. "pallet_foo::bar" to "pallet_foo_bar" - output_file="${pallet//::/_}.rs" - fi - case "$kind" in pallet) args+=( - --output="./parachains/runtimes/$chain_type/$runtime/src/weights/${output_file}" + --output="./parachains/runtimes/$chain_type/$runtime/src/weights/" ) ;; xcm) mkdir -p "./parachains/runtimes/$chain_type/$runtime/src/weights/xcm" args+=( --template=./templates/xcm-bench-template.hbs - --output="./parachains/runtimes/$chain_type/$runtime/src/weights/xcm/${output_file}" + --output="./parachains/runtimes/$chain_type/$runtime/src/weights/xcm/" ) ;; *) From 9ecc0607cb85b29301ab4cdfcb02a2fe37bbbf9d Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 23 Sep 2022 14:32:50 +0200 Subject: [PATCH 2/2] Add --locked Signed-off-by: Oliver Tale-Yazdi --- bench-bot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bench-bot.sh b/bench-bot.sh index 6f5c747..9874e59 100755 --- a/bench-bot.sh +++ b/bench-bot.sh @@ -14,7 +14,7 @@ shopt -s inherit_errexit . "$(dirname "${BASH_SOURCE[0]}")/utils.sh" . "$(dirname "${BASH_SOURCE[0]}")/cmd_runner.sh" -cargo_run_benchmarks="cargo +nightly run --quiet --profile=production" +cargo_run_benchmarks="cargo +nightly run --locked --quiet --profile=production" repository="$(basename "$PWD")" bench_pallet_common_args=(