How to measure Time to recover?
Tags: performance, productivity, programming, software
Published: 2022-05-25 11:13:57

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">Time to recover is one of the most interesting metrics you should use to evaluate your team’s speed, quality, and overall efficiency of your Engineering performance. This metric is also known as Mean time to recover, Mean time to restore, or MTTR.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">There are four key <a href="https://blog.codacy.com/a-tale-of-four-metrics/" target="_blank" rel="noreferrer noopener">Accelerate metrics</a> that we will cover in detail:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li><a href="https://blog.codacy.com/how-to-measure-lead-time-for-changes/" target="_blank" rel="noreferrer noopener">Lead time for changes</a>;</li><li><a href="https://blog.codacy.com/how-to-measure-deployment-frequency/" target="_blank" rel="noreferrer noopener">Deployment frequency</a>;</li><li><strong>Time to recover</strong>; and</li><li>Change failure rate</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">In this article, we are focusing on <strong>Time to recover</strong>. So keep on reading to know what Time to recover is, how we measure it in <a href="https://www.pulse.codacy.com/?utm_source=blog&amp;utm_medium=post&amp;utm_campaign=time-to-recover" target="_blank" rel="noreferrer noopener">Pulse</a>, and how your team can start using it to achieve elite engineering performance.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":1} -->
<h1 id="h-what-is-time-to-recover"><strong>What is Time to recover?</strong></h1>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">In a nutshell, Time to recover measures how long it takes to recover from failure. This metric is correlated with both the speed and the quality of your engineering team.</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>“<em>Traditionally, reliability is measured as time between failures. However, in modern software products and services, which are rapidly changing complex systems, failure is inevitable, so the key question becomes: How quickly can service be restored?</em>”</p><cite>Accelerate: The science of lean software and DevOps: Building and scaling high performing technology organizations</cite></blockquote>
<!-- /wp:quote -->

<!-- wp:heading -->
<h2><strong>What does <strong>Time to recover</strong> measure?</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">Time to recover is a good indicator of teams’ response time and overall development process efficiency. It is one of the most interesting quality metrics for an organization to work on to ensure the availability and correct functioning of their software.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">This metric analyzes how quickly your team can identify incidents and their root causes (e.g., a damaged database or a deployment that breaks an existing feature), notify the appropriate people to deal with those incidents, and resolve them fast.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><strong>How to read <strong>Time to recover</strong>?</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">On the one hand, a Time to recover that is too high indicates that there may be broader issues, like inefficient processes, lack of people, or inadequate team structure. On the other hand, a low Time to recover shows that your team can quickly respond to and resolve incidents.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">Your teams’ goal should be to continuously reduce your Time to recover because it means that, when there is an incident, your team can fix it in a timely fashion, and you are not compromising the availability of your software.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":1} -->
<h1><strong><strong><strong>Time to recover</strong></strong> in Pulse</strong></h1>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">Products like Pulse make it very easy for your team to know how your Time to recover looks like. Pulse connects seamlessly with GitHub, PagerDuty, or your incident management tool to give you Time to recover and other Engineering metrics out-of-the-box. Your team only needs to focus on making informed decisions to improve your results.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><strong>How is Pulse measuring <strong>Time to recover</strong>?</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">Pulse measures Time to recover by calculating how long it takes your organization to recover from a failure in production (e.g., service impairment or unplanned outrage). It’s computed with the following formula:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center"><code>average(incident resolved timestamp - incident created timestamp)</code></p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":5359,"sizeSlug":"large","linkDestination":"none","tdCaptionAlign":"https://blog.codacy.com/wp-content/uploads/2022/03/Time-to-recover-inside-Pulse.png"} -->
<figure class="wp-block-image aligncenter size-large td-caption-align-https://blog.codacy.com/wp-content/uploads/2022/03/Time-to-recover-inside-Pulse.png"><img src="https://blog.codacy.com/wp-content/uploads/2022/03/Time-to-recover-inside-Pulse-1024x571.png" alt="Time to recover inside Pulse" class="wp-image-5359"/><figcaption>Time to recover in Pulse</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">Pulse takes care of all the details to ensure your metrics are accurate and reliable. For example, Pulse automatically associates incidents with the causing deployments, enabling you to explore the metrics by service and each of your GitHub’s team.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><strong>What&nbsp;Time to recover should a team have?</strong></h2>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">The best practice performance level for this metric, published every year on the <a href="https://services.google.com/fh/files/misc/state-of-devops-2021.pdf" target="_blank" rel="noreferrer noopener">Accelerate State of DevOps 2021 report</a>:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li><strong>Elite:</strong> Less than 1 hour</li><li><strong>High:</strong> Less than 1 day</li><li><strong>Medium: </strong>Less than 1 week</li><li><strong>Low:</strong> More than or equal to 1 week</li></ul>
<!-- /wp:list -->

<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
<div class="wp-block-buttons"><!-- wp:button {"style":{"color":{}},"className":"pulse-brand__button"} -->
<div class="wp-block-button pulse-brand__button"><a class="wp-block-button__link" href="https://www.pulse.codacy.com/?utm_source=blog&amp;utm_medium=website&amp;utm_campaign=time-to-recover" target="_blank" rel="noreferrer noopener">See what's your Time to recover</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->

<!-- wp:heading {"level":1} -->
<h1><strong>How to use <strong><strong>Time to recover</strong></strong>&nbsp;</strong></h1>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Over time, Time to recover should be getting smaller, while your team increases in the performance level until reaching best practice levels.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Having a small Time to recover allows your team to have a sound overall recovery process, deliver high-quality software quickly, and improve the availability of your software.</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>“<em>When she first looked at her dashboard, she was surprised by how big the MTTR was. It was too high for her liking. She waited for the next outage to see first-hand how the team would react. Quickly, she understood what was going on. They had neglected documenting incident management as part of the onboarding for the new members. She provided training for the new members of her team and provided them with new tools so that they could respond to new incidents faster</em>.”</p><cite><a href="https://blog.codacy.com/a-tale-of-four-metrics/" target="_blank" rel="noreferrer noopener">A tale of four metrics</a> - Codacy</cite></blockquote>
<!-- /wp:quote -->

<!-- wp:heading -->
<h2><strong>Causes of <strong>hig<strong>h Time to recover</strong></strong></strong></h2>
<!-- /wp:heading -->

<!-- wp:list -->
<ul><li>Tests being carried out manually;</li><li>Shortage of people or a change in the organizational structure;</li><li>Inefficiencies in the incident management process (e.g., blocks, dependencies, not using the right tools).</li></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2><strong>How to reduce Time to recov<strong><strong>er</strong></strong></strong></h2>
<!-- /wp:heading -->

<!-- wp:list -->
<ul><li>Improve your organizational structure: the right people can quickly identify the problem’s root cause and resolve it promptly.</li><li>Use test automation: incorporating automated tests at every stage of the CI/CD pipeline can help you reduce delivery times and help you recover quicker.</li><li>Clearly document the incident management process: continuously train team members on the process and on how to react in case of incidents.</li><li>Find potential steps of the incident management process to be automated: any step your team needs to perform manually - assigning a responsible, or creating a document - adds to Time to recover.</li></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":1} -->
<h1><strong>Conclusion</strong></h1>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">Time to recover is a fundamental metric to analyze and improve the efficiency of your Engineering team. It is a valuable metric to understand the capabilities of your team and how quickly they respond to problems and outrages.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">Together with Lead time for changes, Deployment frequency, and Change failure rate, this metric provides valuable insights for your team to achieve full engineering performance.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">With Pulse, you can easily measure and analyze the Time to recover in your projects and make better decisions.</p>
<!-- /wp:paragraph -->