Engineering metrics (DORA and SPACE)
Measure the team's delivery, not people's activity. The four DORA metrics show speed (change lead time, deployment frequency) and stability (change fail rate, recovery time) together. SPACE reminds you that productivity has many sides, so mix system data with what people say in surveys. Break lead time into parts to find where work waits, look at trends, and use the numbers to start a conversation, never to rank people.
Author: bezzad
Contents
The problem: “How fast is your team?”
You lead the checkout team of our online shop. The director asks: “Is your team getting faster or slower? The other teams say they finish 40 story points per sprint. How many do you finish?”
You have no good answer. Story points are your team’s own estimates, so they cannot be compared between teams. The number of tickets says nothing about value. And you know that a feature the team “finished” two weeks ago is still not in production, because it waits for a release.
You need a few numbers that show how well the team delivers working software, that are hard to game, and that help the team improve. This is what engineering metrics are for.
Three kinds of numbers
Before choosing metrics, know what kind of number you are looking at:
- Activity: commits, lines of code, tickets closed, hours online. Easy to count and easy to game. They say how busy people are, not what they achieved.
- Output and flow: how often working changes reach users, how long it takes, how often they break. This is what DORA and flow metrics measure.
- Outcome: did the change help the user or the business? For example, more completed checkouts or fewer support tickets. This is the real goal, but it is slower to see and depends on more than engineering.
A good set of metrics uses flow numbers to improve how the team works, and outcome numbers to check that the work matters. Activity numbers are, at most, a hint for a question.
The four DORA metrics
DORA (DevOps Research and Assessment) is a research program that has studied thousands of teams for about ten years. It found four metrics that, together, predict how well a team delivers software.
- Change lead time: the time from a commit to that commit running in production. Short is good.
- Deployment frequency: how often the team deploys to production. Often is good, because each deploy is small.
- Change fail rate: the share of deploys that cause a problem in production and need a fix, a rollback or a hotfix. Low is good.
- Failed deployment recovery time: how long it takes to get back to normal after a bad deploy. Short is good. (Older texts call this MTTR, mean time to restore.)
The main finding: speed and stability go together. The best teams deploy often and break less, because small changes are easy to review, test and roll back. A team that deploys once a month packs many changes in one release, so each release is risky.
Where the numbers come from
You do not need a big tool to start. The data is already in your systems:
- Git: the time of each commit and when its pull request was opened, reviewed and merged.
- CI/CD: when each deploy to production started and finished, and which commits it had.
- Incident tool or tickets: which deploys caused an incident, and when the incident was resolved.
A simple query gives the median lead time per week, if you store each deployed commit with its times:
-- deployed_commits: one row per commit that reached production
SELECT
date_trunc('week', deployed_at) AS week,
percentile_cont(0.5) WITHIN GROUP (
ORDER BY deployed_at - committed_at
) AS median_lead_time,
count(DISTINCT deploy_id) AS deploys
FROM deployed_commits
WHERE service = 'checkout'
GROUP BY week
ORDER BY week;
- Use the median (or the 85th percentile), not the average. One commit that waited a month makes the average useless.
- Look at trends over weeks and months, not one week. A single week is noise.
- Write down the definition of each metric, for example “a failed change is a deploy that needs a rollback or a hotfix within 7 days”, so everyone counts the same way.
Break lead time into parts
A lead time of 9 days tells you there is a problem, not where it is. Split it into steps:
- Coding time: first commit to opening the pull request.
- Pickup time: pull request opened to first review.
- Review time: first review to merge.
- Deploy wait: merge to running in production.
Most of the time, the biggest part is waiting, not working. Typical fixes:
- Long pickup time: agree that reviews come before starting new work, keep pull requests small, and limit work in progress.
- Long review time: smaller pull requests, clear descriptions, and pairing on hard changes.
- Long deploy wait: deploy on every merge with a good pipeline and feature flags, instead of a weekly release train.
Flow metrics for the board
Flow metrics come from your board (Jira, Linear, GitHub Projects) and help in daily planning:
- Cycle time: how long one item takes from “in progress” to “done”. Show it as a scatter plot to see the slow items.
- Work in progress (WIP): how many items are open at the same time. High WIP means everything waits. By Little’s law, average cycle time is about WIP divided by throughput, so less WIP gives shorter cycle times.
- Throughput: how many items are done per week. Use it for forecasting, together with item size kept small.
- Blocked time: how long items wait for another team or a decision. This often shows a team design problem (see the team topologies lesson).
SPACE: productivity has many sides
DORA measures delivery. But a team can have good DORA numbers and still burn out. The SPACE framework (2021, from researchers at GitHub, Microsoft and the University of Victoria) says developer productivity has five sides:
- S – Satisfaction and well-being: are people happy with their work, tools and team? Do they feel burned out?
- P – Performance: the outcome of the work: quality, reliability, impact on users.
- A – Activity: counts of actions, like deploys or reviews. Useful only next to the others.
- C – Communication and collaboration: how well information and reviews flow, how fast new people get help.
- E – Efficiency and flow: can people work without interruptions and waits? Lead time and handoffs live here.
How to use it:
- Choose metrics from at least three of the five sides, so one number cannot fool you.
- Mix system data (from tools) with perception data (a short survey every month or quarter). Questions like “How easy is it to deploy a change?” or “How often are you blocked?” find problems that tools cannot see.
- Keep the survey short, anonymous for the team, and always share what you changed because of it. Otherwise people stop answering.
How to use metrics as a lead
- Start with a question, not a dashboard. For example: “Why do our changes take 9 days to reach users?” Then pick the few metrics that answer it.
- The team owns the numbers. Show them in the retro, ask the team what they see, and let them choose one thing to improve.
- Change one thing, then watch the trend. For example: “Reviews before new work” for one month, then look at pickup time again.
- Pair every speed metric with a quality metric. Deployment frequency with change fail rate. Throughput with escaped bugs.
- Report trends upward, with context. “Lead time went from 9 to 4 days after we removed the weekly release” is much better than a table of numbers.
- Never compare teams on these numbers. Teams have different services, risks and starting points. Compare a team with its own past.
Common mistakes
| Mistake | Result | Better way |
|---|---|---|
| Ranking people by commits or story points | Gaming, less help and less review. | Measure the team. Judge people by goals and feedback. |
| Only speed metrics | Faster deploys, more incidents. | Always pair speed with stability. |
| Average lead time | One old item hides everything. | Median or 85th percentile, over weeks. |
| A target like “deploy 10 times a day” | People split deploys to hit the number. | Use the number to find waits, not as a goal. |
| Comparing teams | Unfair, and teams start to hide problems. | Compare a team with its own trend. |
| Only tool data | Burnout and frustration are not visible. | Add a short SPACE-style survey. |
| A dashboard nobody discusses | No change. | Review the numbers in the retro and pick one action. |
Summary in 6 lines
- Measure the team’s delivery and outcomes, not people’s activity. Never rank or pay by a metric.
- DORA: change lead time and deployment frequency (speed), change fail rate and recovery time (stability).
- Speed and stability go together: small, frequent changes are safer.
- Split lead time into coding, pickup, review and deploy wait. The waits are usually the problem.
- SPACE: use at least three sides, and mix tool data with a short survey.
- Start with a question, let the team own the numbers, change one thing and watch the trend.