Digital transformation has turned every organization into a software company, regardless of the industry they are part of. Companies are required to react faster to changing customer needs but on the other hand, deliver stable services to their customers. In order to meet these requirements, DevOps teams and lean practitioners have to constantly improve themselves.
DORA metrics addresses this need by providing objective data to measure the performance of software delivery teams and drive product improvement.
What are DORA metrics?
To determine the right metrics to track the effectiveness and efficiency of software teams, DevOps Research and Assessment team came up with four metrics that can be used by teams to measure their performance and find out whether they are “low performers” to “elite performers”.
The four metrics used are deployment frequency (DF), Lead time (LT), Mean time to recovery (MTTR), and Change Failure Rate (CFR).
Out of these four metrics Lead Time measures the amount of time needed to implement, test, and deliver changes to the codebase. This metric measures the time between work packet creation till its completion into production. It is one of the measures of software delivery performance also known as Development Velocity.
Benefits of implementing Lead Time
Lead Time metrics help a team to:
- Spot the areas for improvement when it comes to the delivery process
- Understand what actions to take to streamline the process
- Deliver quickly, ensuring higher quality
- Ensure stability and accountability of a product
- Make decisions based on data, not assumptions
- Spot problems like the lack of people or inefficiency of testing
- Deliver more value to clients by ensuring fast iterations and better responsiveness to feedback
- Increase the business value of a product faster and reduce waste
Let’s try to understand Lead Time in more detail.
Lead Time: As mentioned earlier, it is the time from when request for a requirement/ feature gets raised to the time it gets released into production i.e., the total time elapsed from the creation of work items to their completion. It measures the time spent in development, testing, implementation and integration but does not include the time spent in backlog prioritization and design. Shorter product lead times enable faster feedback on what is getting built and allows for quick correction.
The lower the lead time for changes, the more efficient a DevOps team is in deploying code.
In order to measure Lead Time, two pieces of data (or timestamps) are required: The exact time of the commit and the exact time of the deployment – in other words, the time from start to finish of a product. The average time is then used as an indicator for overall performance.
The question this metrics answers is, how long does it take to go from code committed to code successfully running in production.
How to calculate Lead Time?
To measure Lead Time for Changes, we need two pieces of data:
- The time taken for commit
- The time taken to release it into production
To measure lead time, calculate the time elapsed between making a commit and releasing it to production.
Calculating lead time beginning after creating a task helps teams understand the full feature life cycle, including the design and planning stages.
Based on this metric, performance of a DevOps team can be divided into four categories as per the following benchmark:
- Elite Performers: Less than one hour
- High Performer: Between one day and one week
- Medium Performers: Between one month and six months
- Low Performers: More than months
One of the ways to collect data is to simply ask developers for the average lead times. A better way would be with the help of a dedicated DevOps metrics platform.
Integrating the DevOps software and committing data into everyday tracking using an automated metrics platform will give you more accurate results that are easier to aggregate and analyze.
Why should we measure Lead Time?
Lead Time is an indicator of how quickly a team responds to needs and fixes. It represents the efficiency of the process, code complexity, and team’s capacity.
The metric helps to understand how long it takes to get changes to production. If Lead Time is too high, it shows inefficiencies and bottlenecks in the process hurting team velocity and morale. A short lead time shows that a team reacts to feedback and changes quickly, sets their industry’s pace for innovation, and ultimately wins the marketplace. The team’s goal should be to reduce Lead Time for changes and react to issues in a timely manner.
In high-performing organizations, developers integrate commits to the main branch with fewer roadblocks and less time is spent waiting. Hence, deploying features into production becomes effortless, automatic and smooth.
This metric is also essential while working with clients, who prefer to work with a team that responds to urgent bug fixes within hours.
Causes of high Lead Time
High Lead Time for changes is most often caused by inefficient processes and introducing too big changes to production. Other reasons are:
- Poor Definition of Ready
- Manual testing
- Blocks and dependencies
- Inefficient development process
- Complex routes to production
- Huge changes introduced to code
How to optimize Lead Time?
Optimizing and reducing lead time can be beneficial for a DevOps team and for the success of business.
To optimize Lead Time for Changes, a team has to:
- Work with smaller iterations – smaller changes will help developers to get feedback faster and resolve issues quickly.
- CI/ CD – Automate the pipeline – Continuous deployment is a commonly used strategy in software development process where each code commit or merged pull request is automatically released to production once it passes the automated testing stage. CI/CD integrates the continuous deployment strategy with continuous integration, a practice where code changes are made regularly.
By employing these two strategies, CI/CD enables development teams to deploy code to production more efficiently and quickly.
By implementing CI/CD, speeding up the delivery process and reducing manual tasks, lead time can be reduced substantially.
- Test Automation – Use automated tests at every stage of CI/CD pipeline to spot issues earlier and to make sure the build meets acceptance criteria.
Test automation replaces many of the manual checks for developers and also allows for any necessary changes to be made early in the development life cycle, reducing change failure rates. When you integrate CI/CD with test automation, you can reduce your overall lead time, allowing you to release products to customers at a much faster rate.
- Automate code reviews – Code review is one such process that involves a lot of manual intervention. Automating this activity helps to improve quality and save time.
- Implement Test Driven Development – Integrate testing into the development process i.e., Developers have to understand the requirement, create unit test cases, execute them and then move the code into the test environment. This initiative has the following benefits:
- Raises the level of code quality and guarantees that all procedures are carried out.
- Enables the developers to plan their code before writing the same thereby reducing the time required for development.
- Supports the development teams in delivering high-quality products with fewer bugs and cleaner code.
All these initiatives will have a significant effect in reducing the lead time.
- Identify bottlenecks and eliminate them – One of the initiatives is to identify the bottlenecks in areas like change approval, streamline the required processes and eliminate the processes which do not add any value.
By measuring and tracking Lead Time, a team can make better, more informed decisions about what can be improved and understand how to do that. When Lead Time improves, a team can be sure that they’re making good choices and delivering more value to customers and users of a product. A team should not only thrive to become an elite performer but also has to deliver better business value faster.
Kaiburr helps every product engineering team to measure their performance near real time using industry standard KPIs like those shown below –
You can then drill down to specific trends in lead time for a portfolio, project, initiative, team, epic, sprint or release like the below –
You can also compare lead time with other KPIs to identify bottlenecks and improve –
Reach us at email@example.com to get started with metrics driven continuous improvement in your organization.