Good DPR or bad DPR? That's a benchmark question.
uniteconomics.ai connects your coding agent's OpenTelemetry traces to your GitHub PRs and computes your Dollar-Pull-Request Ratio (DPR) — how much each merged PR costs you in agent spend. Then it tells you where you stand relative to other developers doing the same thing. Questions? Reach us at hi@uniteconomics.ai.
Why We Built This
We're developers. We use Claude Code every day — for side projects, for work, for the kind of tasks that would have taken three times as long two years ago. At some point we started actually looking at the bills. $180 one month, $340 the next. The tooling was clearly working. But were we getting good value out of it?
We ran the math. Divided our agent spend by our merged PRs that month. Got a number. And then had no idea what to do with it. Is $4.65 per PR efficient? Is $12 a sign we're over-prompting, or is that normal for large PRs in a complex codebase? There was no reference point — no benchmark, no community data, nothing to tell us if we were in the top half or the bottom.
That's what we built. The individual metric is easy — anyone can calculate their DPR in a spreadsheet. The hard part is context: what does a good DPR look like for a Claude Code user? How does it compare to Cursor? Is the community getting more efficient as models get cheaper? Those questions require data from a lot of developers. So we built the infrastructure to collect it, anonymize it, and publish it — and in the process built the tool we wished had existed when we first looked at that bill.
What We Measure
The core metric is simple:
DPR = Total Agent Spend ($) / Merged PRs
Example: 12 PRs merged this week, $47 spent on Claude Code
→ DPR = $3.92 per PR
Lower DPR = more efficient. It's your cost-per-unit-of-shipped-work.The headline DPR gets richer with additional breakdowns:
All of this is computed automatically from your OpenTelemetry traces and GitHub PR events — no manual input, no tagging, no extra instrumentation beyond the one env variable you set to connect your agent.
The DPR Index
Every developer who connects to uniteconomics.ai contributes anonymized cost and PR data to the community index. The DPR Index is the spend-weighted weekly average of that data — broken down by agent, updated every Monday morning.
This is the part you can't replicate yourself. The index answers questions like:
- What's the community average DPR right now, and is it trending up or down?
- Which coding agent has the lowest DPR across all users?
- What does the top 10% of Claude Code users spend per PR?
- Has the community gotten more efficient since models got cheaper?
The index is free to read. The individual benchmark — where your DPR sits relative to developers using the same agent — is what you get when you connect.
Where does your DPR rank?
Connect your agent's OpenTelemetry traces and GitHub in under 5 minutes. See your DPR, track your trend, benchmark against other developers using the same tools.
How the DPR Index is Calculated
The DPR Index is designed to be transparent and simple. This section describes how individual DPR is computed, how session-to-PR correlation works, and how the community index is aggregated.
1. Collecting Cost Data via OpenTelemetry
Claude Code (and several other agents) natively support OpenTelemetry export. When you set your OTEL endpoint to uniteconomics.ai's collector, we receive standard spans for every agent session:
We never see your code, your prompts, or the content of model responses. The OTEL protocol only sends span metadata — cost, timing, and structural information.
2. Correlating Sessions to PRs
The GitHub App watches for PR events on connected repos. Each PR carries a branch name. We match agent sessions to PRs using the following logic, in priority order:
Sessions that don't correlate to any merged PR within 7 days are classified as abandoned and counted toward the abandoned session cost metric — not toward your DPR numerator.
3. Computing Your DPR
Once sessions are matched to merged PRs, the DPR is straightforward:
DPR = sum(session_cost_usd for matched sessions) / count(merged PRs)
Where:
session_cost_usd = sum of (input_tokens + output_tokens) × model_price_per_token
for all spans in the session
merged PRs = PRs that were merged (not just opened or closed without merge)
in the calculation window
Calculation window: rolling 7 days, updated weeklyModel pricing is updated automatically when providers change their rates. Historical DPR values are not retroactively recalculated — the DPR you saw at a given date reflects the pricing in effect at that time.
4. The Community Index
The community DPR is a spend-weighted median across all contributing developers, segmented by agent:
Community DPR(agent, t) = spend_weighted_median(DPR_i for all developers using agent)
in the 7-day window ending on date t
Spend-weighted: developers with higher agent spend have more influence on the index.
This prevents low-volume outliers from distorting the benchmark.5. Privacy & Data Handling
The system is designed to be safe to connect to:
- We receive OTEL span metadata — cost signals, timing, and structure. Not your code or prompts.
- PR metadata from GitHub is limited to branch name, merge status, PR size indicators, and timestamps. Not your diff or commit messages.
- Your individual DPR is private to you. The community index only ever publishes aggregated, anonymized values.
- No individual developer identity is ever published. The index is aggregated across agents, not across named contributors.
Since we use standard OpenTelemetry, you can inspect exactly what your agent is sending before you point the endpoint at us. Privacy by design, not by promise.