-
-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(bench): Add benchmark-action (#2283)
Signed-off-by: Dave Henderson <[email protected]>
- Loading branch information
1 parent
f4d9693
commit 66fd58b
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: go benchmarks | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
benchmark: | ||
name: benchmark regression check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: Run benchmark | ||
run: make bench.txt | ||
- name: Download previous benchmark data | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./cache | ||
key: ${{ runner.os }}-benchmark | ||
- name: Store benchmark result | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
tool: 'go' | ||
output-file-path: bench.txt | ||
external-data-json-path: ./cache/benchmark-data.json | ||
fail-on-alert: true | ||
comment-on-alert: true | ||
comment-always: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
alert-threshold: "200%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ report.xml | |
*.out | ||
.netlify | ||
docs/.hugo_build.lock | ||
bench.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters