pub struct GatePolicy { /* private fields */ }Expand description
A versioned set of release requirements.
Implementations§
Source§impl GatePolicy
impl GatePolicy
Sourcepub fn new(name: impl Into<String>) -> Result<Self>
pub fn new(name: impl Into<String>) -> Result<Self>
Create an empty policy. Add only the checks the release requires.
Sourcepub fn strict(name: impl Into<String>) -> Result<Self>
pub fn strict(name: impl Into<String>) -> Result<Self>
A conservative default: at least one run, perfect aggregate pass rates, no comparison regressions, and no removed cases.
Sourcepub fn with_minimum_runs(self, minimum: usize) -> Result<Self>
pub fn with_minimum_runs(self, minimum: usize) -> Result<Self>
Require at least this many candidate runs.
Sourcepub fn with_minimum_run_pass_rate(self, minimum: f64) -> Result<Self>
pub fn with_minimum_run_pass_rate(self, minimum: f64) -> Result<Self>
Require the aggregate run pass rate.
Sourcepub fn with_minimum_case_pass_rate(self, minimum: f64) -> Result<Self>
pub fn with_minimum_case_pass_rate(self, minimum: f64) -> Result<Self>
Require the mean per-case pass rate.
Sourcepub fn with_assertion_minimum(
self,
assertion: impl Into<String>,
minimum: f64,
) -> Result<Self>
pub fn with_assertion_minimum( self, assertion: impl Into<String>, minimum: f64, ) -> Result<Self>
Require one named assertion to appear and meet a pass-rate floor.
Sourcepub fn with_tag_minimum(
self,
tag: impl Into<String>,
minimum: f64,
) -> Result<Self>
pub fn with_tag_minimum( self, tag: impl Into<String>, minimum: f64, ) -> Result<Self>
Require the mean pass rate of cases carrying tag.
Sourcepub fn with_maximum_total_cost_usd(self, maximum: f64) -> Result<Self>
pub fn with_maximum_total_cost_usd(self, maximum: f64) -> Result<Self>
Cap the candidate experiment’s total recorded cost.
Sourcepub fn with_maximum_cost_ratio(self, maximum: f64) -> Result<Self>
pub fn with_maximum_cost_ratio(self, maximum: f64) -> Result<Self>
Cap candidate cost / baseline cost. Requires a comparison report.
Sourcepub fn with_maximum_regressions(self, maximum: usize) -> Self
pub fn with_maximum_regressions(self, maximum: usize) -> Self
Cap the comparison report’s threshold breaches.
Sourcepub fn with_forbid_removed_cases(self, forbid: bool) -> Self
pub fn with_forbid_removed_cases(self, forbid: bool) -> Self
Block when a baseline case is absent from the candidate.
Sourcepub fn with_comparison_thresholds(
self,
thresholds: CompareThresholds,
) -> Result<Self>
pub fn with_comparison_thresholds( self, thresholds: CompareThresholds, ) -> Result<Self>
Configure the pass-rate and latency thresholds used when the gate recomputes a baseline comparison.
Trait Implementations§
Source§impl Clone for GatePolicy
impl Clone for GatePolicy
Source§fn clone(&self) -> GatePolicy
fn clone(&self) -> GatePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more