# Time to deploy

## Summary

Time to deploy is one of the [DORA metrics](/definitions/dora-metrics.md), key to understanding the health of a team’s deployment infrastructure. Measures the time it takes from pull request merge to deployment. Part of [change lead time](/definitions/dora-metrics/change-lead-time.md).

## Example

If you merge a pull request at 2:10pm and it's deployed by 2:34pm, the time to deploy is 24 minutes.

## Why it matters

Time to deploy helps measure how long it takes to deploy a release into a development, testing, or production environment. Measuring this metric can help improve deployment and delivery methods, processes, and tools.

Useful for understanding how much delay your current deployment process is causing in your deployment process.

## Benchmarks

* **Great:** < 15 minutes
* **Good:** < 60 minutes
* **Needs attention:** ≥ 60 minutes

## How to use it

If you have a high time to deploy or have seen a recent increase, having a discussion with your team to understand the root cause behind this can help unlock key areas for improvement in your delivery.

{% hint style="warning" %}
Time to deploy is not available when using [merged pull requests](/settings/organization/configuring-deployments-in-swarmia/generate-deployments-from-merged-pull-requests.md) as the deployment source. For more information, see [Deployment settings](/settings/organization/configuring-deployments-in-swarmia.md).
{% endhint %}

### Where to find it

You can find time to deploy (as well as the other DORA metrics) under Metrics → DORA

## Frequently asked questions

### Why is my time to deploy 0 or missing?

The most common reasons are:

1. **You're using** [**merged pull requests**](/settings/organization/configuring-deployments-in-swarmia/generate-deployments-from-merged-pull-requests.md) **as the deployment source.** This is because we only know when the PR was merged, but we don't get any signal when it is in production. If you want to track time to deploy, you need to use another deployment source.
2. **The deployment doesn't have** [**associated pull requests**](/features/metrics/track-dora-metrics/how-swarmia-links-prs-to-deployments.md)**.**
3. **The deployment is a redeployment.** If a deployment has the same hash as the previous one, we label it as a "redeployment" and exclude it from metrics. This is usually a symptom of you accidentally sending the same deployment more than once.
4. **The deployment is reported to have happened before the associated PR merges.** This means the time to deploy would be negative, which we treat as 0.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.swarmia.com/definitions/dora-metrics/time-to-deploy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
