Metrics and Queries for Delivery with DORA Measures
This lesson explains the DORA measures, and how to obtain them from pipeline data.
Learning outcomes
After completing this lesson, you will be able to:
- Define the four DORA measures.
- Calculate each measure from delivery records.
- Identify sources of pipeline data.
- Interpret changes in speed and stability together.
The DORA measures
The DevOps Research and Assessment (DORA) program studied thousands of teams and found a small set of measures that predict delivery performance. Its central finding is that speed and stability do not trade off: the strongest teams are better at both. Two measures describe throughput and two describe stability.
Deployment frequency
Deployment frequency measures how often code reaches production. High frequency implies small batches, which lower the risk of each deployment.
Change lead time
Change lead time is the time from a commit to that commit running in production. It differs from the work item lead time in the previous lessons, since it starts at the commit, so it isolates the delivery pipeline from planning.
Change failure rate
Change failure rate is the percentage of deployments that cause a failure needing remediation, such as a rollback or a hotfix.
Time to restore service
Time to restore service is how long it takes to recover from a failed change or an incident.
The following table shows how to calculate each measure from delivery records. The worked figures come from one month of a hypothetical team's data.
| Measure | Calculation | Example |
|---|---|---|
| Deployment frequency | Production deployments per period | 42 deployments in 30 days, or 1.4 per day |
| Change lead time | Median of deployment time minus commit time | Median of 9 hours |
| Change failure rate | Failed deployments divided by total deployments | 3 of 42, or about 7% |
| Time to restore | Median of recovery time minus failure time | Median of 35 minutes |
The following diagram shows three delivery metrics read together, where throughput improves while stability falls, and the response.

Calculating DORA measures
Getting the data
In Azure Pipelines, each run records its start time, finish time and result, and each deployment job records an environment and the commits that it delivered. The Analytics tab shows pipeline pass rate and duration, and environments show deployment history. For a custom report, the Analytics OData endpoint offers entity sets such as PipelineRuns and PipelineRunActivityResults. The following query returns recent results for one pipeline.
https://analytics.dev.azure.com/{organization}/{project}/_odata/v4.0-preview/PipelineRuns?
$apply=filter(Pipeline/PipelineName eq 'web-app-release'
and CompletedDate ge 2026-10-01Z)
/groupby((RunOutcome), aggregate($count as RunCount))Analytics views cannot be used here, as they hold only work item data. In GitHub, the Deployments REST API and workflow run data supply the same information, and Actions performance metrics give failure rates and run times. Change failure rate needs a definition of failure, which usually comes from incident records, and from labelling hotfix or rollback deployments.
Throughput or stability?
Reading the pair
After a push to automate, deployment frequency tripled and change lead time halved. However, change failure rate rose from 5% to 25%. What does this show, and what should the team do?
The team has improved throughput at the expense of stability, which suggests that testing and validation have not kept pace. The team should look at what failures have in common, then strengthen automated tests and add progressive exposure, such as a canary stage. Slowing deployments back to the old pace would discard the gain, and the DORA finding is that the two can improve together. Small, frequent changes that are well tested reduce failure instead of raising it.
Where does change lead time begin, and how does that differ from work item lead time?
Show answer
It begins at the commit. Work item lead time begins when the item is created, so it also includes planning and backlog time.
Exam Tips
Remember for the exam
- DORA: deployment frequency, change lead time, change failure rate, time to restore.
- Change lead time starts at the commit, not when the work item is created.
- Speed and stability improve together on strong teams.
- Pipeline reporting in Power BI uses OData, such as the PipelineRuns entity set.
- Change failure rate needs a clear definition of failure.