Skip to content

Commit

Permalink
ci: add benchmark workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn committed Sep 9, 2023
1 parent 4098547 commit 420a85b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/gobenchdata-checks.yml
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
29 changes: 29 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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: Publish Benchmarks
uses: bobheadxi/gobenchdata@v1
with:
PRUNE_COUNT: 30
PUBLISH: true
CHECKS: true
PUBLISH_BRANCH: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 420a85b

Please sign in to comment.