Definition
The duration between when a pull request is opened and when it is merged.
Why it matters
Time to Merge is an indicator of how much work in progress your team is managing at any given point in time. High work in progress requires additional overhead to manage and increases context switching across the engineering team. Low Time to Merge is usually correlated with a higher Pull Request Success Rate and lower Cycle Time.
How to use it
When this metric is high, consider re-evaluating collaborative processes. It may be that the latter end of the software delivery process has too many bottlenecks. To diagnose where work typically gets stuck, look at the metrics that can influence Time to Merge, such as the following:
Review Cycles - High Review Cycles can indicate a disagreement on implementation best practices or a lack of clarity around the goal/scope of the pull request.
Discussion Cycles - High Discussion Cycles can indicate too many people are involved in the pull request review.
PR Size - Large pull requests take more time and can be more difficult to review.
Benchmarks
The median organization averages time to merge of about 41 hours. The fastest quarter of organizations average less than 27 hours, while the slowest quarter average more than 61 hours.