pub fn error_budget_burn_rate(
actual_downtime_minutes: f64,
budget_minutes: f64,
) -> Option<f64>Expand description
How much of the error budget has been spent.
actual_downtime_minutes / budget_minutes. A value at or above 1.0
means the budget is exhausted or overspent.
§Arguments
actual_downtime_minutes— actual downtime observed in the period, in minutes.budget_minutes— the allowed downtime for the period, in minutes (typically fromerror_budget_minutes).
§Returns
The burn rate as a proportion, or None if budget_minutes is zero.
§Examples
use software_engineering::error_budget::error_budget_burn_rate;
assert_eq!(error_budget_burn_rate(21.6, 43.2), Some(0.5));
assert_eq!(error_budget_burn_rate(1.0, 0.0), None);