Skip to main content

Command Palette

Search for a command to run...

DORA Metrics Calculator for Azure DevOps

Updated
2 min read
M

I am a software architect with over a decade of experience in architecting and building software solutions.

🚀 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.

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/ Build API: https://learn.microsoft.com/en-us/rest/api/azure/devops/build/ Release API: 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 SDK Documentation: https://microsoft.github.io/azure-devops-python-api/

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

Azure DevOps Pipeline Documentation:
Pipelines Overview: https://learn.microsoft.com/en-us/azure/devops/pipelines/
Release Management: 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! 🙌

More from this blog

Codingfreaks

40 posts

Helping others to learn