Skip to content

Commit 02755d7

Browse files
committed
chore(scripts): add script to compare perf changes
1 parent e66da96 commit 02755d7

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

justfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,35 @@ benchmark:
9999
cd fixtures/fluid-framework
100100
hyperfine --warmup 2 --runs 4 --ignore-failure "../../target/release/syncpack list"
101101

102+
benchmark-compare:
103+
#!/usr/bin/env bash
104+
set -euxo pipefail
105+
106+
# build the previous release version with debug symbols for profiling
107+
git checkout main
108+
rm -rf target
109+
just build-profile-release
110+
mkdir -p target/main
111+
cp target/release/syncpack target/main/syncpack
112+
rm -rf target/release
113+
# build the current version
114+
git checkout -
115+
just build-profile-release
116+
# compare the two versions
117+
cd fixtures/fluid-framework
118+
hyperfine \
119+
--warmup 4 \
120+
--runs 10 \
121+
--ignore-failure \
122+
--export-markdown ../../target/benchmark-results.md \
123+
--command-name "main" "../../target/main/syncpack list" \
124+
--command-name "current" "../../target/release/syncpack list"
125+
echo ""
126+
echo "Results saved to benchmark-results.md"
127+
prettier --write benchmark-results.md
128+
cat ../../target/benchmark-results.md
129+
130+
102131
flamegraph:
103132
#!/usr/bin/env bash
104133
set -euxo pipefail

0 commit comments

Comments
 (0)