Engineering metrics (DORA)

In one sentence

Measure the delivery system, not individuals: read DORA's throughput and instability metrics together, per service and as trends, alongside surveys and outcomes, and never make them targets (Goodhart's law).

Every metric reads off the same pipeline; the team reviews trends to fix the system, never to rank people.

How it works

  • DORA measures delivery per service: lead time, deploy frequency, recovery time, change fail rate, rework rate.
  • Read throughput and instability together: more deploys with rising failures is not progress.
  • SPACE adds satisfaction, collaboration and flow: mix surveys with system data, never one number.
  • Goodhart's law: target lines of code and you get verbose code; use trends to start team conversations.
  • Never rank people by commits, PRs or lines of code; measure the system and its outcomes.

Check yourself

Answer to mark it learned; your answers aren't scored.

To "boost velocity", leadership proposes that every engineer merge at least 15 PRs a month, tracked on a public dashboard. You're asked for input before it launches. What do you recommend?

Go deeper

Full explanation

DORA (DevOps Research and Assessment) has studied software delivery since 2014 and found that top performers are fast and stable. It measures delivery per application or service with five metrics:

  • Throughput: change lead time (commit to production), deployment frequency, and failed deployment recovery time.
  • Instability: change fail rate (deploys needing immediate intervention, like a rollback or hotfix) and deployment rework rate (unplanned deploys caused by a production incident), added in 2024.

Read them together: deploying twice as often while failures climb is not progress.

DORA measures the pipeline, not productivity or value. SPACE (Forsgren et al., 2021) widens the view: satisfaction and well-being, performance, activity, communication and collaboration, efficiency and flow, mixing surveys with system data.

Goodhart's law: when a measure becomes a target, it stops being a good measure. Target lines of code and you get verbose code; target deploy count and you get empty deploys. So use metrics as team-level trends that start conversations, pair every speed metric with a quality one, and never rank individuals by commits, PRs or lines of code.

Code The five DORA metrics from deploy records
pythonThe five DORA metrics from deploy records
from dataclasses import dataclass
from datetime import datetime, timedelta
from statistics import median

@dataclass
class Deploy:
    service: str
    committed_at: datetime     # when the shipped change was committed
    deployed_at: datetime
    failed: bool               # needed immediate rollback or hotfix
    recovered_at: datetime | None = None
    unplanned: bool = False    # shipped to fix a production incident

def hours(delta: timedelta) -> float:
    return delta / timedelta(hours=1)

def dora(deploys: list[Deploy], days: int) -> dict:
    # Input: ONE service over a period. Never group by author.
    failed = [d for d in deploys if d.failed]
    recovered = [d for d in failed if d.recovered_at]  # skip still-open failures
    return {
        "deploys_per_day": len(deploys) / days,
        "lead_time_h": median(hours(d.deployed_at - d.committed_at) for d in deploys),
        "change_fail_rate": len(failed) / len(deploys),
        "recovery_h": median(hours(d.recovered_at - d.deployed_at) for d in recovered) if recovered else 0.0,
        "rework_rate": sum(d.unplanned for d in deploys) / len(deploys),
    }
Real example

A VP wants a dashboard ranking engineers by PRs merged. You propose DORA per service, a quarterly developer survey and incident counts instead. In this illustrative case, the data shows a 6-day lead time, 4 days of it waiting for code review. The team adds a review rotation and smaller PRs; lead time falls to 2 days while change fail rate stays flat. A PR leaderboard would have rewarded splitting work into trivial PRs and penalized the engineer who spent the week unblocking three others.

Trade-offs +3 · −3

+ You gain

  • Five well-defined metrics that most CI/CD and incident tools can compute.
  • Pairs speed with stability, so one can't quietly improve at the other's expense.
  • Gives Staff engineers evidence for CI, code review or tech-debt investments.

− You pay

  • Measures delivery, not whether you built the right thing; add product outcomes.
  • Gamed quickly once tied to targets, bonuses or rankings.
  • Definitions vary by tool (when lead time starts, what counts as failed), so compare like with like.

Use it when

To find the bottleneck in a team's delivery system, justify platform or debt work, and check whether a change (new CI, AI tools, a reorg) helped, as per-service trends over months.

Avoid it when

Performance reviews, ranking individuals, or comparing very different systems such as a mobile app and a mainframe. Never set a speed target without its paired quality metric.

Numbers to know 4
  • DORA 2024 elite cluster: on-demand deploys, lead time < 1 day, change fail rate ~5%, recovery < 1 hour.
  • Clusters were re-derived from survey data each year; DORA 2025 replaced them with seven team archetypes.
  • Five metrics since 2024 (rework rate added); in 2023, MTTR became failed deployment recovery time.
  • SPACE (Forsgren et al., 2021): five dimensions; combine several and never read activity alone.
Common pitfalls 4
  • Ranking engineers by commits, PRs or lines of code: people optimize the count, not the outcome.
  • Celebrating deploy frequency while change fail rate quietly doubles.
  • Comparing teams whose tools define lead time or failure differently.
  • Measuring without acting: a dashboard nobody discusses changes nothing.
Interview questions 2

Answer out loud first, then reveal.

Your CEO asks how productive engineering is. How do you answer?Show answer

I separate delivery from impact. For delivery I report DORA per service as trends: lead time, deploy frequency, change fail rate, recovery time. For developer experience, a short quarterly survey on friction, because activity counts alone mislead. For impact, the product outcomes engineering moved. I'd refuse a per-engineer leaderboard: it gets gamed fast and punishes the people who unblock others. I lose some precision, but the numbers stay honest.

A team doubled its deploy frequency, but incidents went up. How do you read that?Show answer

Throughput improved and stability got worse, so I don't call it progress yet. I check change fail rate and rework rate per service: are failures concentrated in one area, and did PR size or review depth change when deploys sped up? The fix is usually in the safety net, not the speed: tests, canaries, feature flags, faster rollback. DORA's data says top performers are strong on both, so the goal is regaining stability without giving the speed back.