Stateless CI
Stateless CI runs benchmarks and generates an HTML report on each push — no history, no artifact tracking, no merge. Each run is independent.
When to Use Stateless
Section titled “When to Use Stateless”- Quick benchmark reports on every push
- PR benchmark comparisons (generate and comment)
- One-time benchmark visualizations
- Simple setups that don’t need release tracking
Tutorial
Section titled “Tutorial”-
Set up the workflow
Create
.github/workflows/bench.yml:name: Benchmarkson:push:branches: [main]workflow_dispatch:jobs:bench:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v4- uses: actions/setup-go@v6with:go-version-file: go.mod- uses: goptics/vizb@v0with:bench-cmd: "go test -bench=."output-html: benchmark.html- uses: actions/upload-artifact@v4with:name: benchmark-reportpath: benchmark.html -
(Optional) Deploy to GitHub Pages
Add a deploy step to publish the report:
- uses: peaceiris/actions-gh-pages@v4with:github_token: ${{ secrets.GITHUB_TOKEN }}publish_dir: .publish_branch: gh-pages -
Run the workflow
Push to
mainor trigger manually via Actions → Run workflow. The HTML report will be available as a downloadable artifact or on GitHub Pages.
Variations
Section titled “Variations”Using a benchmark file from a previous step
Section titled “Using a benchmark file from a previous step”jobs: bench: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v6 with: go-version-file: go.mod
- name: Run benchmarks run: go test -bench=. > bench.txt
- uses: goptics/vizb@v0 with: bench-file: bench.txt output-html: report.htmlWith grouping and log scale
Section titled “With grouping and log scale”- uses: goptics/vizb@v0 with: bench-cmd: "go test -bench=." group-pattern: "n/x/y" scale: log output-html: report.html