1. Help Center
  2. Metrics & Definitions

Change lead time

Change lead time measures the full lifecycle of a pull request from the first commit to deployment.

Summary

Change lead time is one of the DORA metrics and a key deployment insight found in Swarmia. It measures the time it takes for pull requests to go from the first commit to deployment and helps you identify wait times and bottlenecks in your development process.

Pull request cycle time, on the other hand, excludes the last part of the lifecycle, time to deploy, and includes only the time from the first commit to pull request merge.

Despite being related, it makes the most sense to look at pull request cycle time and deployment metrics like change lead time separately. Slow time to deploy might mask the improvements you're making in the rest of your development process.

Using two separate metrics also ensures that missing lifecycle data doesn't skew the metrics. Pull request cycle time can be calculated for all pull requests, whereas change lead time is only calculated for pull requests that belong to applications that have deployments configured in Swarmia.

If a deployment includes multiple pull requests, Change lead time is calculated for each pull request. If the same pull request is deployed to multiple environments, Change lead time is calculated for each deployment.

Examples

Example 1

If you have three deployments that took 2 days, 3 days, and 1.5 days from the first commit to deployment, your Change lead time would be 2.17 days.

Example 2

You have two deployments to different environments, each with the same two pull requests:

  • Deployment to staging:
    • PR #123
    • PR #456
  • Deployment to production:
    • PR #123
    • PR #456

This will be interpreted as four changes, each with a Change lead time:

  1. From the first commit in PR #123 to deployment to staging
  2. From the first commit in PR #456 to deployment to staging
  3. From the first commit in PR #123 to deployment to production
  4. From the first commit in PR #456 to deployment to production

If you're viewing just these two deployments in Deployment Insights, the Change lead time you'll see will be the average of these four changes. In practice, however, we suggest filtering only the most appropriate environment for your analysis.

Why it matters

Change lead time is an indicator of how quickly you can ship new things to production. High change lead time can indicate too large batch sizes, slow code review/QA, or long CI/CD wait times.

Benchmarks

What does good Change lead time look like? In general, you can consider these benchmarks:

  • Great: < 24 hours
  • Good: < 3 working days
  • Needs attention: > 7 working days

How to use it

Measure change lead time in combination with other deployment and DORA metrics to ensure a healthy balance of speed vs stability in your delivery. 

Where to find it

You can find change lead time (as well as the other DORA metrics) under Insights → Code → Deployments.