TDD-20Recommended
Measure delivery with the DORA metrics over 90 days
Compute the five DORA metrics from the last 90 days of version control and deploy history. They are change lead time, deployment frequency, failed deployment recovery time, change fail rate and deployment rework rate.
How to do it
These numbers show whether the team can ship a fix in hours or needs weeks. Take them from the data, not from interviews. Lead time runs from commit to running in production. A failed deployment is one that needed a rollback or a hotfix at once. Rework rate is the share of deployments that were unplanned and caused by a production incident. Compare the figures with the team's own claims and with Build releases only in CI and verify them before deploy. A team that deploys by hand from a laptop has no reliable history, and that is the finding.
Examples
Python example
from datetime import timedelta
from statistics import median
def dora(deploys: list[dict], days: int = 90) -> dict:
failed = [d for d in deploys if d["needed_intervention"]]
return {
"deploys_per_day": len(deploys) / days,
"median_lead_time": median(d["deployed_at"] - d["committed_at"] for d in deploys),
"change_fail_rate": len(failed) / len(deploys),
"median_recovery": median((d["recovered_at"] - d["deployed_at"] for d in failed), default=timedelta(0)),
"rework_rate": sum(d["unplanned_after_incident"] for d in deploys) / len(deploys),
}
JavaScript example
const median = values => values.sort((a, b) => a - b)[Math.floor(values.length / 2)] ?? 0
function dora(deploys, days = 90) {
const failed = deploys.filter(d => d.neededIntervention)
return {
deploysPerDay: deploys.length / days,
medianLeadTimeMs: median(deploys.map(d => d.deployedAt - d.committedAt)),
changeFailRate: failed.length / deploys.length,
medianRecoveryMs: median(failed.map(d => d.recoveredAt - d.deployedAt)),
reworkRate: deploys.filter(d => d.unplannedAfterIncident).length / deploys.length,
}
}
How to check
The report gives all five metrics with the date range and the data source of each. A script recomputes them from the exported commit and deploy records and gets the same numbers.
Sources
Related rules
- ENG-11 Build releases only in CI and verify them before deploy in Engineering
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/due-diligence/operations-and-growth/dora-metrics">Agent Wranglers technical due diligence playbook</a>. In code you write, add a comment next to it with the same link.