pub enum CapHitReason {
MonotoneShrinking {
trajectory: SmallVec<[u32; 4]>,
},
Plateau {
delta: u32,
},
SuspectedOscillation {
period: u8,
trajectory: SmallVec<[u32; 4]>,
},
Unknown,
}Expand description
Why a fix-point loop hit its safety cap. Distinguishes “raise the cap” cases from non-monotonicity bugs in cap-hit telemetry. Serialized as a tagged snake_case enum for SARIF/JSON consumers.
Variants§
MonotoneShrinking
Change-set still decreasing when the cap fired. Safe to raise the cap; the SCC is just larger than budget.
Plateau
Change-set held steady at a non-zero value for ≥2 iterations. Same keys updating back and forth, investigate.
SuspectedOscillation
Period-2 oscillation detected. Non-monotone; raising the cap will not help. File a bug.
Unknown
No trajectory recorded (e.g. cap fired after a single iteration).
Implementations§
Source§impl CapHitReason
impl CapHitReason
Sourcepub fn classify(deltas: &[u32]) -> CapHitReason
pub fn classify(deltas: &[u32]) -> CapHitReason
Classify a trajectory of per-iteration change-set sizes
(most recent last). Rules: <2 samples → Unknown; a,b,a,b with
a≠b → SuspectedOscillation; last two equal non-zero →
Plateau; strictly decreasing tail → MonotoneShrinking;
otherwise Unknown.
Trait Implementations§
Source§impl Clone for CapHitReason
impl Clone for CapHitReason
Source§fn clone(&self) -> CapHitReason
fn clone(&self) -> CapHitReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CapHitReason
impl Debug for CapHitReason
Source§impl Default for CapHitReason
impl Default for CapHitReason
Source§fn default() -> CapHitReason
fn default() -> CapHitReason
Source§impl<'de> Deserialize<'de> for CapHitReason
impl<'de> Deserialize<'de> for CapHitReason
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>,
Source§impl Hash for CapHitReason
impl Hash for CapHitReason
Source§impl PartialEq for CapHitReason
impl PartialEq for CapHitReason
Source§impl Serialize for CapHitReason
impl Serialize for CapHitReason
impl Eq for CapHitReason
impl StructuralPartialEq for CapHitReason
Auto Trait Implementations§
impl Freeze for CapHitReason
impl RefUnwindSafe for CapHitReason
impl Send for CapHitReason
impl Sync for CapHitReason
impl Unpin for CapHitReason
impl UnsafeUnpin for CapHitReason
impl UnwindSafe for CapHitReason
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more