Skip to content

Commit

Permalink
chore: added benchmark comparison script
Browse files Browse the repository at this point in the history
  • Loading branch information
Eagle941 committed Sep 17, 2024
1 parent 2ca7610 commit e9de00a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/bench.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# This script analyses the peformance changes of commit $2 with respect to $1.

cd "$(dirname "$0")"

BEFORE_CHANGES_COMMIT=$1
AFTER_CHANGES_COMMIT=$2

git checkout -q $BEFORE_CHANGES_COMMIT
echo "Running bechmark on commit $BEFORE_CHANGES_COMMIT"
cargo bench --quiet --locked --bench blockifier_bench -- --save-baseline before_changes --noplot > /dev/null 2>&1

git checkout -q $AFTER_CHANGES_COMMIT
echo "Running bechmark on commit $AFTER_CHANGES_COMMIT"
cargo bench --quiet --locked --bench blockifier_bench -- --save-baseline after_changes --noplot > /dev/null 2>&1

cargo bench --quiet --bench blockifier_bench -- --load-baseline after_changes --baseline before_changes --noplot --verbose

0 comments on commit e9de00a

Please sign in to comment.