-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
46 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,11 @@ | ||
checks: | ||
- name: My Check | ||
description: |- | ||
Define a check here - in this example, we caculate % difference for NsPerOp in the diff function. | ||
diff is a function where you receive two parameters, current and base, and in general this function | ||
should return a negative value for an improvement and a positive value for a regression. | ||
package: . | ||
benchmarks: [] | ||
diff: (current.NsPerOp - base.NsPerOp) / base.NsPerOp * 100 | ||
thresholds: | ||
max: 10 |
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,35 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
paths: | ||
- "**" | ||
- "!**.md" | ||
pull_request: | ||
paths: | ||
- "**" | ||
- "!**.md" | ||
|
||
name: Run Benchmarks | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21.x" | ||
- name: Publish Benchmarks | ||
run: go run github.com/efectn-forks/gobenchdata@latest action | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
INPUT_PRUNE_COUNT: 30 | ||
INPUT_GO_TEST_FLAGS: -cpu 1,2 | ||
INPUT_PUBLISH: true | ||
INPUT_CHECKS: true | ||
INPUT_CHECKS_CONFIG: .github/gobenchdata-checks.yml | ||
INPUT_SUBDIRECTORY: ace amber django handlebars html jet mustache pug slim | ||
INPUT_PUBLISH_BRANCH: gh-pages |