haozeke/ASV Perch

Post formatted ASV benchmark comparison results as PR comments with regression detection, emoji indicators, and collapsible sections.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
github-tokenGitHub token for API access (posting PR comments, auto-draft). Not required when post-comment is false and auto-draft-on-regression is false (token-less artifact-only mode).no${{ github.token }}
results-pathPath to downloaded ASV results directoryno
comparison-text-filePath to pre-computed comparison output file. When provided, skips running asv-spyglass entirely and uses this file as the raw output.no
comparison-modeComparison mode: 'compare' for two-way (default) or 'compare-many' for multi-way baseline vs multiple contenders.nocompare
baseline-shaFor compare-many mode: the baseline commit SHA. Used to find the baseline result file by SHA prefix.no
contender-shasFor compare-many mode: comma-separated contender commit SHAs. Used to find contender result files by SHA prefix.no
baseline-fileFor compare-many mode: direct path to baseline result JSON file. Bypasses SHA-based lookup. Use this when comparing different environments that ran the same commit.no
contender-filesFor compare-many mode: comma-separated direct paths to contender result JSON files. Bypasses SHA-based lookup. Order must match contender-labels if both are provided.no
baselineYAML config for the baseline entry. Fields: label, sha, file, run-prefix (wrapper command, e.g. "pixi run -e bench"), setup (sourced before command, e.g. "source ./env.sh"), env, description. Execution: setup && run-prefix benchmark-command.no
contendersYAML list of contender objects for compare-many mode. Each object has: label (required), sha or file (one required for comparison), run-prefix (wrapper command), setup (sourced before command), env, description. When provided, overrides contender-files/ contender-shas/contender-labels.no
benchmark-commandDefault shell command to run benchmarks. Use {sha} as placeholder for the commit SHA (replaced in setup, run-prefix, and command). Each entry's run-prefix is prepended and setup is sourced before. Entries without a sha field skip benchmarking.noasv run --record-samples {sha}^!
init-commandShell command to run once before any benchmarks. Use for one-time setup like 'asv machine --yes'.no
preserve-pathsComma-separated paths to preserve across git checkouts. When an entry has a sha, the action runs git checkout -f {sha} && git clean -fd automatically. These paths are stashed to /tmp before checkout and restored after. Example: 'benchmarks/, asv.conf.json'.no
baseline-labelFor compare-many mode: label for the baseline column.no
contender-labelsFor compare-many mode: comma-separated labels for each contender, matching the order of contender-shas (e.g. "opt-build,debug-build").no
asv-spyglass-argsExtra CLI flags passed through to asv-spyglass (e.g. --split, --only-changed, --only-regressed, --factor 1.2, --sort ratio).no
base-shaBase commit SHA (overrides metadata-file)no
pr-shaPR head commit SHA (overrides metadata-file)no
base-fileDirect path to base result JSON file. Bypasses SHA-based file lookup. Useful when files are not named by SHA prefix.no
pr-fileDirect path to PR result JSON file. Bypasses SHA-based file lookup. Useful when files are not named by SHA prefix.no
metadata-filePath to metadata.txt with main_sha=/base_sha= and pr_sha= lines. Alternative to explicit SHA inputs.no
regression-thresholdRatio above which a benchmark is a critical regressionno10
auto-draft-on-regressionConvert PR to draft when critical regression detectednofalse
comment-markerHTML comment marker for idempotent updatesno<!-- asv-benchmark-result -->
label-beforeLabel for the base/before columnnomain
label-afterLabel for the head/after columnnopr
asv-spyglass-refGit ref for asv-spyglass installnomain
runner-infoRunner name shown in details sectionnoubuntu-latest
dashboard-urlLink to ASV dashboard (optional)no
env-diffWhen true, parse baseline/contender ASV result JSON and append an "## Environment inventory" section (added/removed/version-bumped packages). Pure TypeScript -- does not require asv-spyglass for this feature. Cheap JSON parse; default true. Set false to skip.notrue
post-commentWhen true (default), create or update a PR comment with the comparison. Set false for token-less workflows that only need the markdown body (pair with upload-comment-artifact).notrue
upload-comment-artifactWhen true, write the comment markdown to comment-artifact-path and set comment-body-path / comment-artifact-name outputs. Pair with a follow-up actions/upload-artifact step so fork/PR jobs can skip pull-requests: write and hand the body to a trusted commenter.nofalse
comment-artifact-nameArtifact name when upload-comment-artifact is truenoasv-perch-comment
comment-artifact-pathFilesystem path for the prepared comment markdown when upload-comment-artifact is true (also exposed as comment-body-path output).noasv-perch-comment.md
namedescription
comparisonRaw asv-spyglass comparison output
regression-detectedWhether a critical regression was detected
comment-idID of the created or updated comment
pr-numberNumber of the associated pull request
comment-body-pathPath to the written comment markdown when upload-comment-artifact is true
comment-artifact-nameName of the uploaded artifact when upload-comment-artifact is true