esigs.dora.lib
1.0.0
See the version list below for details.
dotnet add package esigs.dora.lib --version 1.0.0
NuGet\Install-Package esigs.dora.lib -Version 1.0.0
<PackageReference Include="esigs.dora.lib" Version="1.0.0" />
<PackageVersion Include="esigs.dora.lib" Version="1.0.0" />
<PackageReference Include="esigs.dora.lib" />
paket add esigs.dora.lib --version 1.0.0
#r "nuget: esigs.dora.lib, 1.0.0"
#:package esigs.dora.lib@1.0.0
#addin nuget:?package=esigs.dora.lib&version=1.0.0
#tool nuget:?package=esigs.dora.lib&version=1.0.0
Dora Metrics Tracker
Overview
The Dora Metrics Tracker is a .NET library designed to help track key DORA (DevOps Research and Assessment) metrics: Deployment Frequency, Lead Time for Changes, Change Failure Rate, and Mean Time to Recovery. It provides a flexible interface (IDoraMetricsTracker
) with different implementations for storing and retrieving these metrics, including an in-memory solution and a file-based JSON storage solution.
Features
- Track DORA Metrics: Record deployments and incidents to calculate core DORA metrics.
- Flexible Storage: Choose between in-memory tracking for quick testing/prototyping or file-based JSON storage for persistence.
- Extensible: Easily implement new storage mechanisms by adhering to the
IDoraMetricsTracker
interface. - Dependency Injection Friendly: Designed for seamless integration with dependency injection containers.
Getting Started
Prerequisites
- .NET SDK (Version 9.0 or later recommended)
Building the Project
To build the entire solution, navigate to the project's root directory and run:
dotnet build DoraSolution.sln
Running Tests
To execute all unit tests, run the following command from the project's root directory:
dotnet test DoraSolution.sln
Usage
The core functionality is exposed through the IDoraMetricsTracker
interface. You can inject an implementation of this interface into your application.
Example (Conceptual)
// Example of how to use the IDoraMetricsTracker (actual setup depends on your DI container)
public class MyService
{
private readonly IDoraMetricsTracker _metricsTracker;
public MyService(IDoraMetricsTracker metricsTracker)
{
_metricsTracker = metricsTracker;
}
public void PerformDeployment()
{
// ... perform deployment logic ...
// Record a successful deployment
var result = _metricsTracker.RecordDeployment(DateTime.UtcNow, true, TimeSpan.FromHours(2));
if (result.IsFailure)
{
Console.WriteLine($"Failed to record deployment: {result.Error}");
}
}
public void AnalyzeMetrics()
{
var startDate = DateTime.UtcNow.AddMonths(-1);
var endDate = DateTime.UtcNow;
var deploymentFrequency = _metricsTracker.GetDeploymentFrequency(startDate, endDate);
if (deploymentFrequency.IsSuccess)
{
Console.WriteLine($"Deployment Frequency: {deploymentFrequency.Value}");
}
// ... similar calls for other metrics ...
}
}
Available Implementations
InMemoryDoraMetricsTracker
: Stores all metrics data in memory. Ideal for short-lived applications or testing.FileBasedDoraMetricsTracker
: Persists metrics data to a JSON file. Requires configuration viaDoraFileStorageOptions
.
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- esigs.dora.iface (>= 1.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.8)
- Microsoft.Extensions.Options (>= 9.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.1.8-g570dda1647 | 152 | 9/1/2025 |
1.1.4-g07db0044b9 | 144 | 9/1/2025 |
1.1.3-g4068ca7ce5 | 140 | 9/1/2025 |
1.1.1-g16080c1b9a | 143 | 9/1/2025 |
1.0.0 | 156 | 9/1/2025 |