Skip to content

Commit 3d6bf47

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 3d6bf47

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/testing.yml

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

4545
- name: Run tests
4646
run: make test
47+
48+
- name: Run becnchmark
49+
run: |
50+
make bench
51+
52+
- name: AB performance
53+
run: |
54+
go get golang.org/x/tools/cmd/benchcmp
55+
make bench > b.txt && git fetch && git checkout master
56+
go test -bench=. -benchmem -benchtime=1s -cpu=4 > a.txt
57+
benchcmp a.txt b.txt
58+
59+
# - uses: WillAbides/benchdiff-action@v0
60+
# with:
61+
# benchdiff_version: 0.6.2
62+
# status_name: test-bench-result
63+
# status_on_degraded: neutral
64+
# benchdiff_args: |
65+
# --base-ref=master
66+
# --cpu=1
67+
# --count=5
68+
# --warmup-count=1
69+
# --tolerance=30
70+
# --benchmem
71+
# --debug

0 commit comments

Comments
 (0)