pub struct HysteresisConfig {
pub margin: f32,
pub min_dwell: u64,
}Expand description
Anti-thrash policy for slot swaps (mirrors the llama.cpp hot-expert cache hysteresis gate + dwell). Both knobs default to off so existing callers keep the plain top-S paired-swap behavior.
Fields§
§margin: f32A challenger expert must exceed an incumbent’s hit count by this fraction
before it may evict it (e.g. 0.25 = “must be ≥25% hotter”). 0.0 disables
the margin so any strictly-hotter expert wins.
min_dwell: u64An incumbent may not be evicted until it has been resident for at least this
many refreshes (dwell / minimum-hold). 0 disables the dwell gate.
Implementations§
Trait Implementations§
Source§impl Clone for HysteresisConfig
impl Clone for HysteresisConfig
Source§fn clone(&self) -> HysteresisConfig
fn clone(&self) -> HysteresisConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HysteresisConfig
Source§impl Debug for HysteresisConfig
impl Debug for HysteresisConfig
Source§impl Default for HysteresisConfig
impl Default for HysteresisConfig
Source§impl PartialEq for HysteresisConfig
impl PartialEq for HysteresisConfig
impl StructuralPartialEq for HysteresisConfig
Auto Trait Implementations§
impl Freeze for HysteresisConfig
impl RefUnwindSafe for HysteresisConfig
impl Send for HysteresisConfig
impl Sync for HysteresisConfig
impl Unpin for HysteresisConfig
impl UnsafeUnpin for HysteresisConfig
impl UnwindSafe for HysteresisConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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