pub enum ResolutionWarning {
InsufficientResolution {
unique_values: usize,
total_samples: usize,
zero_fraction: f64,
timer_resolution_ns: f64,
},
HighQuantization {
unique_values: usize,
total_samples: usize,
},
}Expand description
Warning from the resolution check.
Variants§
InsufficientResolution
Timer resolution is too coarse for the operation being measured.
Severity: ResultUndermining
The statistical analysis will be unreliable because most measurements are quantized to the same few values.
Fields
HighQuantization
Many samples have identical timing values.
Severity: Informational
This may indicate quantization effects from coarse timer resolution, but the statistical analysis is still valid.
Implementations§
Source§impl ResolutionWarning
impl ResolutionWarning
Sourcepub fn is_result_undermining(&self) -> bool
pub fn is_result_undermining(&self) -> bool
Check if this warning undermines result confidence.
Sourcepub fn severity(&self) -> PreflightSeverity
pub fn severity(&self) -> PreflightSeverity
Get the severity of this warning.
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get a human-readable description of the warning.
Sourcepub fn guidance(&self) -> Option<String>
pub fn guidance(&self) -> Option<String>
Get guidance for addressing this warning.
Note: This provides generic guidance. For context-aware recommendations (e.g., based on timer fallback reason), see the output formatting layer.
Sourcepub fn to_warning_info(&self) -> PreflightWarningInfo
pub fn to_warning_info(&self) -> PreflightWarningInfo
Convert to a PreflightWarningInfo.
Trait Implementations§
Source§impl Clone for ResolutionWarning
impl Clone for ResolutionWarning
Source§fn clone(&self) -> ResolutionWarning
fn clone(&self) -> ResolutionWarning
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolutionWarning
impl Debug for ResolutionWarning
Source§impl<'de> Deserialize<'de> for ResolutionWarning
impl<'de> Deserialize<'de> for ResolutionWarning
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ResolutionWarning
impl RefUnwindSafe for ResolutionWarning
impl Send for ResolutionWarning
impl Sync for ResolutionWarning
impl Unpin for ResolutionWarning
impl UnsafeUnpin for ResolutionWarning
impl UnwindSafe for ResolutionWarning
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.