pub struct RegimeClassifier { /* private fields */ }Expand description
Classifier that determines the current workload phase from throughput and latency signals.
Implementations§
Source§impl RegimeClassifier
impl RegimeClassifier
Sourcepub fn new(warmup_samples: u32, burst_threshold: f64) -> Self
pub fn new(warmup_samples: u32, burst_threshold: f64) -> Self
Create a new classifier.
warmup_samples: number of samples to stay in Warmup phaseburst_threshold: multiplier above steady-state EMA to trigger Burst
Sourcepub fn observe_throughput(&mut self, throughput: f64) -> WorkloadPhase
pub fn observe_throughput(&mut self, throughput: f64) -> WorkloadPhase
Update the classifier with a new throughput observation.
Sourcepub fn set_phase(&mut self, phase: WorkloadPhase)
pub fn set_phase(&mut self, phase: WorkloadPhase)
Force a specific phase (e.g., on system restart).
Sourcepub fn phase(&self) -> WorkloadPhase
pub fn phase(&self) -> WorkloadPhase
Current phase.
Auto Trait Implementations§
impl Freeze for RegimeClassifier
impl RefUnwindSafe for RegimeClassifier
impl Send for RegimeClassifier
impl Sync for RegimeClassifier
impl Unpin for RegimeClassifier
impl UnsafeUnpin for RegimeClassifier
impl UnwindSafe for RegimeClassifier
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