prperf

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.

Sign in with GitHub Get the GitHub Action

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:

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.

.github/workflows/prperf.yml
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.

1 Check Run base→head numbers — allocations, GC, time, CPU — right in the PR's Checks tab. See it on prperf-sample #1 2 Sticky comment The same table as a PR comment — posted only when a threshold is crossed, edited in place on each push. See it on prperf-sample #1 3 Flamegraph diff An interactive base-vs-head flamegraph showing which method got heavier. Open the diff

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.