Diff every Ruby PR's performance
Your CI profiles each Ruby PR with the open-source rperf profiler; prperf compares it against the base branch and reports on the Check Run, never blocking CI. Codecov for test coverage, but for performance.
What it does
On every pull request, prperf runs your benchmark under rperf, compares it against the latest run on the base branch, and posts:
- a Check Run with base→head numbers — allocations, GC, time, CPU, RSS;
- a sticky PR comment, only when a threshold you set is exceeded;
- a flamegraph diff showing which method got heavier.
It never blocks CI and needs no secrets (OIDC upload). Public repositories need no App install — the action writes the Check Run with the workflow token. Private repositories install the prperf App so it can write the Check Run for them.
How you write it
One workflow, triggered on both push to the default branch
(records the base) and pull_request (compared against it). You
fill in only the highlighted command — the action
measures it under rperf for you; everything else is copy-paste.
name: prperf
on:
push: { branches: [main, master] } # records the base (default branch)
pull_request: # compared against the base
jobs:
bench:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # OIDC upload (no secrets)
checks: write # write the Check Run (public repos)
pull-requests: write # write the sticky comment (public repos)
steps:
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with: { bundler-cache: true }
- uses: rperf-dev/prperf-action@v1
with:
run: bin/rails runner "" # ← the only line you fill in
Docs: prperf-action (inputs, thresholds, examples) · full manual (setup, writing benchmarks, reading results).
How it looks
One PR run shows up in three places. Every example below is the live prperf-sample #1, where a new feature quietly added ~45% more allocations — no login needed.
Usage limits
Results are kept for 15 days. Public repositories need no install; private repositories just need the prperf App installed. Paid plans are coming.