Skip to content

standalone benchmark #35

standalone benchmark

standalone benchmark #35

Workflow file for this run

name: Benchmark
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: write
jobs:
benchmark:
strategy:
matrix:
os: [ubuntu-latest]
go: ["1.22"]
include:
- os: ubuntu-latest
go-build: ~/.cache/go-build
name: ${{ matrix.os }} @ Go ${{ matrix.go }} ${{ matrix.test-tags }}
runs-on: ${{ matrix.os }}
env:
GO111MODULE: on
GOPROXY: https://proxy.golang.org
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: false
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: actions/cache@v4
with:
path: |
${{ matrix.go-build }}
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Benchmark
run: make bench
- name: Upload benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "go"
output-file-path: benchmark.out
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: "200%"
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: "@ktrz"