Skip to content

refactor(bench): simplify metrics and improve time formatting #6

refactor(bench): simplify metrics and improve time formatting

refactor(bench): simplify metrics and improve time formatting #6

Workflow file for this run

name: Continuous Benchmarking
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
deployments: write
jobs:
benchmark:
name: Performance Benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Run benchmarks
run: |
go test -bench=. -benchmem -run=^$ ./... | tee bench_output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Go Benchmarks
tool: 'go'
output-file-path: bench_output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '120%'
comment-on-alert: true
fail-on-alert: false
# Enable Job Summary
summary-always: true