pub struct Slo {
pub objective: Objective,
pub period: Window,
}Expand description
Fields§
§objective: ObjectiveThe reliability target.
period: WindowThe rolling period the objective is measured over.
Implementations§
Source§impl Slo
impl Slo
Sourcepub fn new(objective: Objective, period: Window) -> Self
pub fn new(objective: Objective, period: Window) -> Self
Create an SLO from an objective and a period.
Sourcepub fn error_budget_ratio(&self) -> f64
pub fn error_budget_ratio(&self) -> f64
The fraction of events allowed to fail, i.e. 1 - objective.
Sourcepub fn error_budget(&self, total_events: f64) -> ErrorBudget
pub fn error_budget(&self, total_events: f64) -> ErrorBudget
Build a concrete ErrorBudget for a known total event count over the
period.
Trait Implementations§
impl Copy for Slo
impl StructuralPartialEq for Slo
Auto Trait Implementations§
impl Freeze for Slo
impl RefUnwindSafe for Slo
impl Send for Slo
impl Sync for Slo
impl Unpin for Slo
impl UnsafeUnpin for Slo
impl UnwindSafe for Slo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more