Skip to content

Commit

Permalink
Merge pull request #2319 from conectado/update-benchmark-ci
Browse files Browse the repository at this point in the history
Update benchmarks CI to use less steps to save time
  • Loading branch information
shamil-gadelshin authored Apr 2, 2021
2 parents 19d5e16 + 0ef5fa8 commit d373a5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/joystream-node-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions scripts/generate-weights.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@

SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")

STEPS=${1:-50}
REPEAT=${2:-20}

benchmark() {
echo "Generating weights for $1..."
start=`date +%s`
ERROR=$($SCRIPT_DIR/../target/release/joystream-node benchmark \
--pallet=$1 \
--extrinsic=* \
--chain=dev \
--steps=50 \
--repeat=20 \
--steps=$STEPS \
--repeat=$REPEAT \
--execution=wasm \
--output=. 2>&1 > /dev/null)

Expand Down

0 comments on commit d373a5c

Please sign in to comment.