# DORA Metrics Calculator for Azure DevOps

🚀 Excited to share a Python-based DORA Metrics Calculator for Azure DevOps that I've been working on!

### Why this is required?

During my learning about Engineering Metrics, I was trying to identify way to calculate measuring team performance, programmatically and you can find it here.  
  
### Repository link

[https://github.com/muralidharand/dora-engineering-metrics](https://github.com/muralidharand/dora-engineering-metrics)

### What you can do ?

This tool helps you track:

✅ Deployment Frequency (DF)  
✅ Lead Time for Changes (LT)  
✅ Change Failure Rate (CFR)  
✅ Mean Time to Recovery (MTTR)

### Key features
\- Branch-specific metrics (perfect for tracking main/production branches)  
\- Customizable date ranges  
\- Detailed deployment pipeline analysis  
\- Easy integration with existing Azure DevOps projects

### Tech stack  
\- Python  
\- Azure DevOps SDK  
\- Pandas for data analysis

I've made the code public for anyone who wants to use or improve it.  
**Required packages**  
\- azure-core  
\- azure-devops  
\- pandas  
\- numpy

### Sample Output
DORA Metrics for releases/v1 branch in Murali.HelloWorld:  
Time Period: Last 15 days  
**Deployment Frequency**: 28.20 deployments/day  
**Lead Time for Changes**: 25.53 hours  
**Change Failure Rate**: 1.32%  
**Time to Restore**: 0.00 hours

### References
Here are the important documentation resources that helped me in building this DORA metrics calculator:

Azure DevOps REST API Documentation:  
Main documentation: [https://learn.microsoft.com/en-us/rest/api/azure/devops/](https://learn.microsoft.com/en-us/rest/api/azure/devops/)[  
](https://lnkd.in/g8MntXXA%EF%BF%BCBuild)Build API: [https://learn.microsoft.com/en-us/rest/api/azure/devops/build/](https://learn.microsoft.com/en-us/rest/api/azure/devops/build/)[  
](https://lnkd.in/g6Hp8Z94%EF%BF%BCRelease)Release API: [https://learn.microsoft.com/en-us/rest/api/azure/devops/release/](https://learn.microsoft.com/en-us/rest/api/azure/devops/release/)

Azure DevOps Python SDK:  
GitHub Repository: [https://github.com/microsoft/azure-devops-python-api](https://github.com/microsoft/azure-devops-python-api)[  
](https://lnkd.in/gjiRn3Ab%EF%BF%BCSDK)SDK Documentation: [https://microsoft.github.io/azure-devops-python-api/](https://microsoft.github.io/azure-devops-python-api/)

DORA Metrics Official Documentation:  
DORA Research Program: [https://dora.dev/](https://dora.dev/)  
Metrics Definitions: [https://dora.dev/metrics/](https://dora.dev/metrics/)  
Google's DevOps Research: [https://cloud.google.com/devops/state-of-devops](https://cloud.google.com/devops/state-of-devops)

Azure DevOps Pipeline Documentation:  
Pipelines Overview: [https://learn.microsoft.com/en-us/azure/devops/pipelines/](https://learn.microsoft.com/en-us/azure/devops/pipelines/)  
Release Management: [https://learn.microsoft.com/en-us/azure/devops/pipelines/release/](https://learn.microsoft.com/en-us/azure/devops/pipelines/release/)

P.S. Special thanks to the Azure DevOps and Python communities for their amazing documentation and support! 🙌
