It can be incredibly valuable for teams to look at their cycle time and throughput from a high level as it helps to identify opportunities for adjustments and ways to improve existing workflows.
In the end, the intention of measuring cycle time and throughput in software development is to improve your product and the happiness of your developers, who often get frustrated with slow cycle time.
What is Cycle Time and Throughput?
Cycle time and throughput are two of the DORA metrics. DORA stands for DevOps Research and Assessment. These metrics were popularized in a book called Accelerate that came out in 2018.
Cycle time typically refers to the lead time for changes, while throughput refers to deployment frequency.
The two other DORA metrics are: mean time to recover and change failure rate. These can also be known as north star metrics, value stream analytics, etc.
DORA metrics are meant to encapsulate the same two principals: ship code faster with higher quality. Cycle time and throughput are the speed indicators; they measure the pace and frequency in which you and your team are releasing software to your customers.
The code changes that you ship should be delivering value and making your customers happy.
Cycle Time Definition
Cycle time is measuring how long it take to merge a change into production, breaking down three different metrics:
- Development time
- Review time
- Deployment time
This can be measured by looking at any unit of work. It doesn’t have to be a pull request, though that is a common metric for measuring cycle time. It could also be a Jira issue or the lifecycle of commits or branches.
Throughput is looking at how frequently changes are being merged and they pace they’re introduced by considering things like how many pull requests are merged per week, how many Jira issues are being processed a week, etc.
Throughput does not account for code complexity, so it may not provide you with a full picture of why some PRs take a longer time to merge than others, but it can be helpful to understand your team’s merge rate.
What is “Good” Cycle Time and Throughput?
It’s important to take a pause and consider what you’re trying to achieve by looking at these metrics. What defines “good” in the context of cycle and throughput for software development?
According to DORA and other 3rd party surveys, cycle time for elite performing teams should be less than one day; you can start and complete a change and push it out into production. Ultimately the lesson is: the faster you can do these things without sacrificing code quality, the better performing your team will be.
Ultimately, it’s important for you to find a baseline that makes sense for your team and focus on being better, not good. You might be part of a financial or government organization, for example, that simply doesn’t have the ability to merge things in under one day.
What Defines a Change?
Most teams focus on merged or accepted pull requests as a metric when measuring changes to a project, but it’s also important to look at changes from a holistic level. From planning and design to development to pull requests and code review, and finally to deployment. This will help you identify any bottlenecks.
Why Does Cycle Time Matter?
As a developer, the longer your code stays unmerged, the more complicated your workflow becomes. Additionally, unmerged code can increase the likelihood of:
- Git merge conflicts
- The need to rework or refactor code
- Changes being abandoned
- Having difficulty getting back to a productive development state
When you and your team are looking at why your pull requests are taking a long time to review, you should ask the following questions:
- Does the code quality reflect internal rules and best practices?
- Are there missing tests or dependencies?
- Are code reviewers overloaded?
- Are your developers overloaded with new tasks?
- Is your team experiencing too much context switching?
Throughput & Cycle Time Calculator
While your team can conduct manual calculator and reporting, this can be time-consuming. Using a throughput and cycle time calculator can speed up the process and help you identify areas of improvement faster.
Grader.gitkraken.com is a free website application that can spin up baseline numbers for teams to get the process started for measuring cycle time and throughput by grading their Git repositories.
Tips for Improving Cycle Time & Throughput
A good central goal to focus on if you want to improve your team’s cycle time and throughput metrics is to start building feedback loops before the pull request. Ways to enable this include:
- Pair programming
- Technical design documentation
- Share and collaborate on code before the PR:
- Draft PRs
- Live share
- Shareable links to branches or commits
Share links to branches and commits with the deep-linking feature in GitKraken Client, allowing your team to quickly access the code they need to focus on.