Browse Source

ci: update benchmarks to use less steps

conectado 4 years ago
parent
commit
0ef5fa88ac
2 changed files with 7 additions and 4 deletions
  1. 2 2
      .github/workflows/joystream-node-benchmarks.yml
  2. 5 2
      scripts/generate-weights.sh

+ 2 - 2
.github/workflows/joystream-node-benchmarks.yml

@@ -41,7 +41,7 @@ jobs:
 
       - name: Generate Weights
         run: |
-          ./scripts/generate-weights.sh
+          ./scripts/generate-weights.sh 5 2
           # Show any changes in computed weights
           git diff
-        if: env.GIT_DIFF
+        if: env.GIT_DIFF

+ 5 - 2
scripts/generate-weights.sh

@@ -4,6 +4,9 @@
 
 SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
 
+STEPS=${1:-50}
+REPEAT=${2:-20}
+
 benchmark() {
   echo "Generating weights for $1..."
   start=`date +%s`
@@ -11,8 +14,8 @@ benchmark() {
       --pallet=$1 \
       --extrinsic=* \
       --chain=dev \
-      --steps=50 \
-      --repeat=20 \
+      --steps=$STEPS \
+      --repeat=$REPEAT \
       --execution=wasm \
       --output=. 2>&1 > /dev/null)