Skip to content

Commit 34e0b5d

Browse files
committed
ci: add ci steps for running benchmark tests
Added third party gh-action for A/B testing of performance degradation. Follows up #122
1 parent 68df18f commit 34e0b5d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/testing.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,26 @@ jobs:
4444

4545
- name: Run tests
4646
run: make test
47+
48+
- name: Run becnchmark
49+
run: |
50+
make bench > a.txt
51+
git checkout master
52+
go test -bench=. -benchmem -benchtime=1s -cpu=4 > b.txt
53+
go benchcmp new.txt old.txt
54+
55+
- uses: WillAbides/benchdiff-action@v0
56+
with:
57+
benchdiff_version: 0.6.2
58+
status_name: test-bench-result
59+
status_on_degraded: neutral
60+
benchdiff_args: |
61+
--bench="."
62+
--count=10
63+
--warmup-count=1
64+
--benchtime=500ms
65+
--debug
66+
--benchstat-output=markdown
67+
--tolerance=50
68+
--clear-cache
69+
--base-ref=origin/master

0 commit comments

Comments
 (0)