Pull request cycle time (or PR cycle time) is the total time a pull request spends in all stages of the development pipeline.
In Swarmia, a pull requests cycle time is the sum of these three components:
- Time in progress — from the first commit or from when the pull request is opened, whichever happens first to the first review request.
- Time in review — from the first review request to the final approval.
- Time to merge — from the final approval to once the pull request is merged.
A pull request is opened on a Monday and then the first review is requested on Wednesday, that equals 2 days 'in progress'.
Then that pull request takes another day for review approval, that equals 1 day in 'review'.
And finally, another full day passes between the final approval and the pull request being merged. That’s 1 day time to merge.
Together this equals a pull request cycle time of 4 days.
The average PR cycle time for a given time period would be the cycle time of all pull requests in that time period, averaged.
Why it matters
Lower cycle time means:
- Shipping in small batches without interruptions
- Getting feedback from end users faster
- Reducing risk and overhead
- Reviewing and merging new code quickly
How to use it
You can use your pull request cycle time to determine areas of improvement in your development process as well as a tool for planning future work and limiting work in progress as needed.
Where to find it
You can find pull request cycle time in the Pull Requests view and several other parts of Swarmia, wherever PRs are shown.