From 3ed71fbda54bb2d1932c097b888da657c67d3ce6 Mon Sep 17 00:00:00 2001 From: William Freudenberger Date: Wed, 20 Sep 2023 20:38:16 +0200 Subject: [PATCH] feat: support single pallet check benchmark --- scripts/check_benchmarks.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/scripts/check_benchmarks.sh b/scripts/check_benchmarks.sh index c2c9c58feb..2213edc073 100755 --- a/scripts/check_benchmarks.sh +++ b/scripts/check_benchmarks.sh @@ -1,6 +1,7 @@ set -eu runtime=$1 +pallet=$2 run_benchmark() { pallet=$1 @@ -40,7 +41,16 @@ all_pallets=$( ./target/release/centrifuge-chain benchmark pallet --list --chain="${chain}" | tail -n+2 | cut -d',' -f1 | sort | uniq ) -for pallet in $all_pallets -do - run_benchmark $pallet -done +if [ -n "$pallet" ]; +then + echo "Only benchmarking pallet: $pallet" + run_benchmark $pallet +else + echo "Benchmarking all pallets" + for pallet in $all_pallets + do + run_benchmark $pallet + done +fi + +