pub enum InterpretationLevel {
Healthy,
Moderate,
High,
Critical,
}Expand description
Four-level interpretation band for a numerical score.
Produced by InterpretationLevel::for_iis and
InterpretationLevel::for_waste_ratio. Rendered as a short lowercase
label by InterpretationLevel::short_label. The CLI maps each level
to an ANSI color in sentinel-cli/src/main.rs. The serde
representation is lowercase ("healthy" / "moderate" / "high" /
"critical") and is stable across versions, see the module docstring
for the stability contract.
Variants§
Healthy
Signal is below the moderate threshold. Nothing to investigate.
Moderate
Signal is above baseline but below the action threshold. Informational.
High
Signal is at or above the action threshold. Worth investigating.
Critical
Signal is at or above the critical threshold. Very likely a bug.
Implementations§
Source§impl InterpretationLevel
impl InterpretationLevel
Sourcepub fn for_iis(iis: f64) -> Self
pub fn for_iis(iis: f64) -> Self
Classify an I/O Intensity Score (IIS) into a band.
Comparisons use >= to match the N+1 detector’s own
indices.len() >= 10 convention: an IIS of exactly 10.0 is
Critical, not High.
NaN is treated as Healthy (it compares false against every
threshold), which is the safe choice: missing data should not
trigger red output.
Sourcepub fn for_waste_ratio(ratio: f64) -> Self
pub fn for_waste_ratio(ratio: f64) -> Self
Sourcepub const fn short_label(self) -> &'static str
pub const fn short_label(self) -> &'static str
Return a short lowercase label, suitable for CLI parenthetical
rendering: "healthy", "moderate", "high", "critical".
Takes self by value because InterpretationLevel is Copy
(fieldless enum); there’s no reason to add a deref.
Trait Implementations§
Source§impl Clone for InterpretationLevel
impl Clone for InterpretationLevel
Source§fn clone(&self) -> InterpretationLevel
fn clone(&self) -> InterpretationLevel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for InterpretationLevel
Source§impl Debug for InterpretationLevel
impl Debug for InterpretationLevel
Source§impl<'de> Deserialize<'de> for InterpretationLevel
impl<'de> Deserialize<'de> for InterpretationLevel
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>,
impl Eq for InterpretationLevel
Source§impl PartialEq for InterpretationLevel
impl PartialEq for InterpretationLevel
Source§fn eq(&self, other: &InterpretationLevel) -> bool
fn eq(&self, other: &InterpretationLevel) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for InterpretationLevel
impl Serialize for InterpretationLevel
impl StructuralPartialEq for InterpretationLevel
Auto Trait Implementations§
impl Freeze for InterpretationLevel
impl RefUnwindSafe for InterpretationLevel
impl Send for InterpretationLevel
impl Sync for InterpretationLevel
impl Unpin for InterpretationLevel
impl UnsafeUnpin for InterpretationLevel
impl UnwindSafe for InterpretationLevel
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request