royalcat/Go Continuous Benchmarking
Parse Go benchmark output, store results, and publish charts to GitHub Pages
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Feb 19, 2026
- License
- MIT
Pinned Snippet
uses: royalcat/go-continuous-benchmarking@b01da5fa71a12ac08c8a7bde3aeb7d89d753af0c # v0.1.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| mode | Operating mode: parse - Parse go test -bench output on the benchmark runner, auto-detect host metadata (CPU, GOOS, GOARCH, CGO), and write a BenchmarkEntry JSON + raw output log to result-dir. store - Read pre-parsed BenchmarkEntry JSON files, merge them into the branch data on gh-pages, and deploy the frontend dashboard. | yes | — |
| output-file-path | [parse] Path to the file containing go test -bench output. Reads stdin if empty. | no | "" |
| result-dir | [parse] Directory to write entry.json and output.log into. Upload this as an artifact. | no | benchmark-result |
| cpu-model | [parse] CPU model name to record. If empty, auto-detected from the runner machine or go test output. | no | "" |
| cgo-enabled | [parse] CGO enabled status: 'true', 'false', or '' (auto-detect from CGO_ENABLED env var). | no | "" |
| go-version | [parse] Go version string to record (e.g. 'go1.22.0'). If empty, auto-detected from the Go runtime used to build the tool. | no | "" |
| go-module | Go module path to strip from package names in the dashboard. If empty, auto-detected from go.mod or derived from repo URL. | no | "" |
| entries | [store] Glob or comma-separated paths to entry.json files produced by parse mode (required for store mode). | no | "" |
| branch | [store] Git branch name for organizing results. Defaults to the current branch. | no | "" |
| gh-pages-branch | [store] Name of the GitHub Pages branch. | no | gh-pages |
| benchmark-data-dir-path | [store] Path within the GitHub Pages branch to store benchmark data and dashboard. | no | benchmarks |
| github-token | [store] GitHub API token for pushing to the gh-pages branch. | no | "" |
| auto-push | [store] If true, automatically push benchmark results to the gh-pages branch. | no | false |
| max-items-in-chart | [store] Maximum number of data points per branch (0 = unlimited). | no | 0 |
| repo-url | Repository URL displayed in the dashboard header. Defaults to the current repository. | no | "" |
| skip-fetch-gh-pages | [store] If true, skip fetching the gh-pages branch (useful if already checked out). | no | false |
| fail-on-alert | [store] If true, fail the workflow when a benchmark result exceeds the alert threshold. | no | false |
| alert-threshold | [store] Percentage threshold for performance regression alerts (e.g. '200%'). | no | 200% |
Outputs
| name | description |
|---|---|
| result-dir | [parse] Path to the directory containing entry.json and output.log |
| artifact-name | [parse] A unique artifact name derived from the detected run parameters (GOOS, GOARCH, Go version, CGO). Use this as the artifact name in upload-artifact to avoid collisions in matrix builds. |
| benchmark-results-json | [store] Path to the branch JSON file with all benchmark entries |