How waynehacking8/inference-perf-gate works
inference-perf-gate is a GitHub Action that runs or consumes benchmark measurements, compares them with a committed baseline using per-metric direction and tolerance, then reports a verdict and can block a pull request. Its main runtime entrypoint owns input loading, optional benchmark execution, comparison, outputs, and GitHub comment updates; the pure comparison module classifies metrics and renders the report. README documents the self-hosted GPU workflow and check behavior; implementation edges below are grounded in the sampled source.
Main entry points: index.ts Action entrypoint · compare.ts Metric comparison
Components 13
Action runtime
- Measured results
- Committed baseline
- Metric specifications
- Action entrypoint
src/index.ts
Comparison engine
- Metric comparison
src/compare.ts - Markdown renderer
src/compare.ts
GitHub reporting
- Action outputs
src/index.ts - GitHub API
- PR comment
- Check verdict
Other components
- Pull request
- Self-hosted runner
- Benchmark command
Connections 14
- Pull request → Self-hosted runner: triggers
README.md - Self-hosted runner → Benchmark command: runs
README.md - Benchmark command → Measured results: writes
README.md - Self-hosted runner → Action entrypoint: invokes
README.md - Action entrypoint → Benchmark command: executes optionally
src/index.ts - Action entrypoint → Measured results: loads
src/index.ts - Action entrypoint → Committed baseline: loads
src/index.ts - Action entrypoint → Metric specifications: loads
src/index.ts - Action entrypoint → Metric comparison: compares
src/index.ts - Action entrypoint → Markdown renderer: renders
src/index.ts - Action entrypoint → Action outputs: sets
src/index.ts - Action entrypoint → GitHub API: calls
src/index.ts - GitHub API → PR comment: creates or updates
- Action entrypoint → Check verdict: fails on regression
src/index.ts