Lead time for changes: where the time actually goes
Lead time for changes is one of DORA’s four key metrics. DORA defines it as the time a change takes to go from being committed to version control to running in production (DORA’s four keys). Teams with short lead times ship more often and recover faster.
Most teams can’t say where their lead time goes. The usual dashboards start the clock when a pull request opens, and that misses most of the story.
Where a change spends its time
Split one change into stages:
- Coding: from the first commit until the pull request is ready for review.
- Waiting for review: from ready until someone first reviews it.
- Review and rework: from the first review until it’s merged.
- Release: from merge until it’s in production.
“Cycle time”, from opening to merge, only covers the middle two. A pull request that merges 12 minutes after opening looks great, even when its first commit was two days earlier. That hidden first stage is where big batches live: work piles up on a branch, and the pull request is opened when it’s all done.
- Coding
- 31h
- Waiting for review
- 9h
- Review and rework
- 5h
What makes lead time shorter
- Smaller batches. Less coding before the pull request opens, and faster, more thorough reviews. See why small pull requests get reviewed faster.
- A fast first review. Waiting for review is pure queue time: nobody is working on the change. Give each pull request one person who’s accountable for reviewing it, and follow up when it waits.
- Short, predictable releases. Automated deploys keep the last stage from undoing the rest.
What Nudge measures
Nudge reads each pull request from your git host and records:
- Lead time, first commit to merge. The clock starts at the pull request’s earliest commit. If its commits look newer than the pull request, because history was rewritten after it opened, the clock starts at the opening.
- Time to first review, counted from when the pull request was ready for review. Time spent as a draft doesn’t count against the reviewer.
- Cycle time, from opening to merge, so you can see how much of lead time happens before a pull request opens.
- Size, and how review speed changes with it.
Insights shows the median of each, and compares your last 90 days before Nudge with the time since.
Where to start
Compare your lead time with your cycle time. If lead time is much longer, work is piling up before pull requests open: work on smaller batches. If the wait for a first review is long, that’s queue time, and it’s the easiest stage to fix.