DevOps Tutorial · DevOps Basics · Lesson 2 of 25
DevOps Culture and DORA Metrics
The principles behind DevOps and the four DORA metrics teams use to measure delivery performance.
The principles
A common summary is CALMS:
- Culture: shared ownership of production; blameless learning from incidents.
- Automation: builds, tests, deployments and infrastructure are automated.
- Lean: small batches, limited work in progress, fast feedback.
- Measurement: decisions are based on data from the pipeline and production.
- Sharing: knowledge, tools and on-call are shared between developers and operators.
The DORA metrics
The DORA research programme found four metrics that predict software delivery performance:
| Metric | Question | Elite teams |
|---|---|---|
| Deployment frequency | How often do we deploy to production? | On demand, many times a day |
| Lead time for changes | Commit to running in production? | Less than a day |
| Change failure rate | What share of deployments cause a failure? | Low (around 5% or less) |
| Time to restore service | How fast do we recover from a failure? | Less than an hour |
Speed and stability go together: teams that deploy often in small batches also fail less and recover faster. Measure teams to improve the system, never to rank people, or the numbers get gamed.
from datetime import datetime
from statistics import median
deploys = [ # (commit time, deployed time, caused an incident?)
("2026-03-02 09:10", "2026-03-02 11:00", False),
("2026-03-02 13:30", "2026-03-02 14:05", False),
("2026-03-03 10:00", "2026-03-03 16:40", True),
("2026-03-04 08:45", "2026-03-04 09:30", False),
("2026-03-05 15:20", "2026-03-05 15:55", False),
]
fmt = "%Y-%m-%d %H:%M"
lead_hours = [(datetime.strptime(d, fmt) - datetime.strptime(c, fmt)).seconds / 3600 for c, d, _ in deploys]
days = 5
print(f"deployment frequency: {len(deploys) / days:.1f} per day")
print(f"median lead time: {median(lead_hours):.1f} hours")
print(f"change failure rate: {sum(f for *_, f in deploys) / len(deploys):.0%}")
Output
deployment frequency: 1.0 per day median lead time: 0.8 hours change failure rate: 20%
Test yourself
Which is NOT one of the four DORA metrics?
Deployment frequencyLead time for changesLines of code written per developerChange failure rate
Show answer
Answer: Lines of code written per developer
DORA measures delivery outcomes: frequency, lead time, change failure rate and time to restore.