---
title: "Measure delivery with the DORA metrics · Agent Wranglers"
url: https://agentwranglers.se/playbook/due-diligence/operations-and-growth/dora-metrics
id: TDD-20
level: Recommended
updated: 2026-10-27
build: a2a6bdfed830
tokens: 1021
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Measure delivery with the DORA metrics over 90 days

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Operations and growth](https://agentwranglers.se/playbook/due-diligence/operations-and-growth.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: TDD-20
- Level: Recommended
- Chapter: [Operations and growth](https://agentwranglers.se/playbook/due-diligence/operations-and-growth.md)
- Rule: 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.
- 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.
- How: 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](https://agentwranglers.se/playbook/engineering/ci-and-supply-chain/build-in-ci-and-verify.md). A team that deploys by hand from a laptop has no reliable history, and that is the finding.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Python example

```python
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

```js
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,
  }
}
```

## Sources

- [DORA software delivery performance metrics](https://dora.dev/guides/dora-metrics/)

## Related rules

- ENG-11 [Build releases only in CI and verify them before deploy](https://agentwranglers.se/playbook/engineering/ci-and-supply-chain/build-in-ci-and-verify.md) in Engineering

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/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.

- Previous: [List what must be rebuilt to grow](https://agentwranglers.se/playbook/due-diligence/operations-and-growth/rebuild-list.md)
- Next: [Read 12 months of incidents and measured availability](https://agentwranglers.se/playbook/due-diligence/operations-and-growth/incident-history.md)
- [Operations and growth](https://agentwranglers.se/playbook/due-diligence/operations-and-growth.md)
