pub struct LeakDetectorConfig {
pub alpha: f64,
pub lambda: f64,
pub cusum_threshold: f64,
pub cusum_allowance: f64,
pub warmup_frames: usize,
pub sigma_decay: f64,
pub sigma_floor: f64,
}Expand description
Configuration for the allocation leak detector.
Fields§
§alpha: f64False positive rate bound for the e-process (default: 0.05).
lambda: f64Betting fraction λ for the e-process likelihood ratio. Controls sensitivity vs. evidence accumulation speed. Recommended: 0.1–0.5 (default: 0.2).
cusum_threshold: f64CUSUM threshold h. Higher = fewer false positives, slower detection. Rule of thumb: h ≈ 8 with k=0.5 gives two-sided ARL₀ ≈ 2000 (default: 8.0).
cusum_allowance: f64CUSUM reference value k (allowance). Typically δ/2 where δ is the minimum shift to detect. (default: 0.5).
warmup_frames: usizeNumber of warmup frames to estimate baseline mean and σ (default: 30).
sigma_decay: f64EMA decay for running σ estimate (default: 0.95).
sigma_floor: f64Minimum σ floor to prevent division by zero (default: 1.0).
Trait Implementations§
Source§impl Clone for LeakDetectorConfig
impl Clone for LeakDetectorConfig
Source§fn clone(&self) -> LeakDetectorConfig
fn clone(&self) -> LeakDetectorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LeakDetectorConfig
impl Debug for LeakDetectorConfig
Auto Trait Implementations§
impl Freeze for LeakDetectorConfig
impl RefUnwindSafe for LeakDetectorConfig
impl Send for LeakDetectorConfig
impl Sync for LeakDetectorConfig
impl Unpin for LeakDetectorConfig
impl UnwindSafe for LeakDetectorConfig
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
Mutably borrows from an owned value. Read more