TExcelTAD
Home › DevOps Engineering: Overview & Roadmap › DORA Metrics from a Deploy Log

DORA Metrics from a Deploy Log

"Are we getting better at delivering software?" needs numbers, and the most widely used numbers come from DORA (DevOps Research and Assessment), the research programme behind the yearly State of DevOps reports and the book Accelerate (Forsgren, Humble and Kim, 2018). Its research links a small set of delivery metrics to how well organisations perform.

The metrics

DORA's guide at dora.dev currently lists five software delivery metrics in two groups:

Group Metric Question it answers Measured as
Throughput Change lead time how long does a committed change take to reach production? time from commit to running in production
Throughput Deployment frequency how often do we ship? deployments per day/week, or time between them
Throughput Failed deployment recovery time when a deployment breaks something, how fast do we recover? time from the failed deployment to recovery
Instability Change fail rate how often does a deployment need immediate intervention (rollback, hotfix)? failed deployments / all deployments
Instability Deployment rework rate how much of our deploying is unplanned repair work? unplanned deployments caused by a production incident / all deployments

The first four are the original four keys; older material calls recovery time "time to restore" or "MTTR". Rework rate is the newest addition. The central research finding is that speed and stability are not a trade-off: teams that deploy most often also tend to have the lowest failure rates and fastest recovery, because small changes are easier to test, review and undo.

Note: DORA publishes performance groups (elite, high, medium, low) with thresholds that change from one report to the next. Look them up in the current report rather than memorising numbers, and compare a team mainly with its own past.

Computing them from a deploy log

Everything needed is in data a team already has: commit timestamps from Git, deployment events from the pipeline, and incident records. Here is a log of two weeks. Week 11 is after the team split its work into smaller changes and added a canary step:

python · try it yourself
from datetime import datetime
from statistics import median

# id, first commit in the change, deployed to production, needed immediate fix?, minutes to recover, unplanned (hotfix)?
log = [
    ("d01", "2026-03-02 09:00", "2026-03-04 15:00", False, 0,  False),
    ("d02", "2026-03-03 10:30", "2026-03-05 11:00", True,  95, False),
    ("d03", "2026-03-05 11:10", "2026-03-05 12:20", False, 0,  True),   # hotfix for d02
    ("d04", "2026-03-04 14:00", "2026-03-06 16:30", False, 0,  False),
    ("d05", "2026-03-09 09:15", "2026-03-09 13:00", False, 0,  False),
    ("d06", "2026-03-09 10:00", "2026-03-09 15:45", False, 0,  False),
    ("d07", "2026-03-10 08:40", "2026-03-10 11:10", True,  20, False),
    ("d08", "2026-03-10 11:05", "2026-03-10 11:30", False, 0,  True),   # hotfix for d07
    ("d09", "2026-03-11 09:30", "2026-03-11 14:00", False, 0,  False),
    ("d10", "2026-03-12 13:00", "2026-03-12 16:20", False, 0,  False),
    ("d11", "2026-03-13 10:10", "2026-03-13 12:40", False, 0,  False),
]

def parse(text):
    return datetime.strptime(text, "%Y-%m-%d %H:%M")

def week_of(row):
    return parse(row[2]).isocalendar().week

def metrics(rows):
    lead = median((parse(d) - parse(c)).total_seconds() / 3600 for _, c, d, *_ in rows)
    failed = [r for r in rows if r[3]]
    recovery = median(r[4] for r in failed) if failed else 0
    return {
        "deployments": len(rows),
        "lead time (median h)": round(lead, 1),
        "recovery (median min)": recovery,
        "change fail rate": f"{len(failed) / len(rows):.0%}",
        "rework rate": f"{sum(r[5] for r in rows) / len(rows):.0%}",
    }

weeks = sorted({week_of(r) for r in log})
table = {w: metrics([r for r in log if week_of(r) == w]) for w in weeks}
print(f"{'metric':<22}" + "".join(f"{'week ' + str(w):>10}" for w in weeks))
for name in table[weeks[0]]:
    print(f"{name:<22}" + "".join(f"{str(table[w][name]):>10}" for w in weeks))
metric                   week 10   week 11
deployments                    4         7
lead time (median h)        49.5       3.3
recovery (median min)         95        20
change fail rate             25%       14%
rework rate                  25%       14%

Week 11 deploys almost twice as often, each change reaches production in hours instead of two days, and the one failure was caught by the canary and fixed in 20 minutes. Rework rate equals change fail rate here because every failure was fixed with a hotfix deployment; they differ when failures are fixed by flipping a feature flag or by a rollback that the pipeline does not count as a new deployment.

Things to notice in the code, because real dashboards get them wrong:

  • Medians, not averages. One change that sat in review over a weekend should not hide what is typical.
  • Lead time starts at the commit, not at the merge or the start of the deploy job. Waiting for review and waiting for the release are exactly what the metric should expose.
  • "Failed" means needed immediate intervention, not "had a bug someone found next month".
  • Hotfixes are deployments too. They raise deployment frequency, which is why rework rate exists: it shows how much of that frequency is repair.

Why the median

Lead times are skewed: most changes go through quickly and a few get stuck. The mean is pulled up by the few; the median shows the typical change, and a high percentile shows the stuck ones:

python · try it yourself
from statistics import mean, median, quantiles

lead_hours = [1.2, 1.5, 2.0, 2.2, 2.5, 3.0, 3.1, 3.4, 4.0, 4.5, 5.0, 6.0, 7.5, 70.0, 96.0]

print(f"mean   : {mean(lead_hours):5.1f} h")
print(f"median : {median(lead_hours):5.1f} h")
p90 = quantiles(lead_hours, n=10, method="inclusive")[-1]
print(f"p90    : {p90:5.1f} h")
mean   :  14.1 h
median :   3.4 h
p90    :  45.0 h

Report the median as "typical" and the 90th percentile as "how bad it gets". Then look at the slow changes individually: they usually waited for something (a reviewer, an environment, a release window), and that wait is the improvement opportunity (The Three Ways).

Using the numbers well

  • Measure teams and services, not individuals. Ranking developers by deployments creates tiny meaningless deployments and kills honest incident reporting.
  • Watch all of them together. Any single metric can be gamed: deploy more often by deploying empty changes, lower the fail rate by not calling anything a failure. The set keeps each one honest.
  • Use them to find the next experiment, not as a target. "Lead time is two days and most of it is waiting for review" leads to a concrete change; "lead time must be under one day" leads to creative accounting.
  • Automate the collection. Numbers pulled from the pipeline and the incident tool every week are trusted; numbers from a spreadsheet filled in by hand are not.

Each course in the track moves at least one of these metrics: CI/CD shortens lead time and raises deployment frequency, GitOps makes rollbacks a git revert, Observability and SRE shorten recovery time. The Mini Project measures a whole release process.

Test yourself

Which DORA metric measures the time from a commit to that change running in production?

  1. Deployment frequency
  2. Change lead time
  3. Failed deployment recovery time
  4. Change fail rate

What did DORA's research find about speed and stability?

  1. Faster teams always break more things
  2. Top performers do well on both; small, frequent changes are easier to keep stable
  3. Stability requires deploying less often
  4. They cannot be measured together

Why use the median lead time instead of the mean?

  1. The median is always smaller
  2. A few very slow changes pull the mean far away from the typical change
  3. The mean cannot be computed for times
  4. DORA forbids the mean