#[non_exhaustive]pub struct WindowsBasedSli {
pub window_period: Option<Duration>,
pub window_criterion: Option<WindowCriterion>,
}Expand description
A WindowsBasedSli defines good_service as the count of time windows for
which the provided service was of good quality. Criteria for determining
if service was good are embedded in the window_criterion.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.window_period: Option<Duration>Duration over which window quality is evaluated. Must be an integer
fraction of a day and at least 60s.
window_criterion: Option<WindowCriterion>The criterion to use for evaluating window goodness.
Implementations§
Source§impl WindowsBasedSli
impl WindowsBasedSli
Sourcepub fn set_window_period<T: Into<Option<Duration>>>(self, v: T) -> Self
pub fn set_window_period<T: Into<Option<Duration>>>(self, v: T) -> Self
Sets the value of window_period.
Sourcepub fn set_window_criterion<T: Into<Option<WindowCriterion>>>(
self,
v: T,
) -> Self
pub fn set_window_criterion<T: Into<Option<WindowCriterion>>>( self, v: T, ) -> Self
Sets the value of window_criterion.
Sourcepub fn get_good_bad_metric_filter(&self) -> Option<&String>
pub fn get_good_bad_metric_filter(&self) -> Option<&String>
The value of window_criterion
if it holds a GoodBadMetricFilter, None if the field is not set or
holds a different branch.
Sourcepub fn get_good_total_ratio_threshold(
&self,
) -> Option<&Box<PerformanceThreshold>>
pub fn get_good_total_ratio_threshold( &self, ) -> Option<&Box<PerformanceThreshold>>
The value of window_criterion
if it holds a GoodTotalRatioThreshold, None if the field is not set or
holds a different branch.
Sourcepub fn get_metric_mean_in_range(&self) -> Option<&Box<MetricRange>>
pub fn get_metric_mean_in_range(&self) -> Option<&Box<MetricRange>>
The value of window_criterion
if it holds a MetricMeanInRange, None if the field is not set or
holds a different branch.
Sourcepub fn get_metric_sum_in_range(&self) -> Option<&Box<MetricRange>>
pub fn get_metric_sum_in_range(&self) -> Option<&Box<MetricRange>>
The value of window_criterion
if it holds a MetricSumInRange, None if the field is not set or
holds a different branch.
Sourcepub fn set_good_bad_metric_filter<T: Into<String>>(self, v: T) -> Self
pub fn set_good_bad_metric_filter<T: Into<String>>(self, v: T) -> Self
Sets the value of window_criterion
to hold a GoodBadMetricFilter.
Note that all the setters affecting window_criterion are
mutually exclusive.
Sourcepub fn set_good_total_ratio_threshold<T: Into<Box<PerformanceThreshold>>>(
self,
v: T,
) -> Self
pub fn set_good_total_ratio_threshold<T: Into<Box<PerformanceThreshold>>>( self, v: T, ) -> Self
Sets the value of window_criterion
to hold a GoodTotalRatioThreshold.
Note that all the setters affecting window_criterion are
mutually exclusive.
Sourcepub fn set_metric_mean_in_range<T: Into<Box<MetricRange>>>(self, v: T) -> Self
pub fn set_metric_mean_in_range<T: Into<Box<MetricRange>>>(self, v: T) -> Self
Sets the value of window_criterion
to hold a MetricMeanInRange.
Note that all the setters affecting window_criterion are
mutually exclusive.
Sourcepub fn set_metric_sum_in_range<T: Into<Box<MetricRange>>>(self, v: T) -> Self
pub fn set_metric_sum_in_range<T: Into<Box<MetricRange>>>(self, v: T) -> Self
Sets the value of window_criterion
to hold a MetricSumInRange.
Note that all the setters affecting window_criterion are
mutually exclusive.
Trait Implementations§
Source§impl Clone for WindowsBasedSli
impl Clone for WindowsBasedSli
Source§fn clone(&self) -> WindowsBasedSli
fn clone(&self) -> WindowsBasedSli
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more