pub struct TierPolicy {
pub hot_min_score: u32,
pub warm_min_score: u32,
pub warm_bits: u8,
pub drift_pct_q8: u32,
pub group_len: u32,
}Fields§
§hot_min_score: u32§warm_min_score: u32§warm_bits: u8§drift_pct_q8: u32Drift tolerance as Q8 fixed-point. 26 means ~10.2% (26/256).
group_len: u32Implementations§
Source§impl TierPolicy
impl TierPolicy
Sourcepub fn select_bits(
&self,
access_count: u32,
last_access_ts: u32,
now_ts: u32,
) -> u8
pub fn select_bits( &self, access_count: u32, last_access_ts: u32, now_ts: u32, ) -> u8
Select bit width based on access pattern.
Sourcepub fn drift_factor(&self) -> f32
pub fn drift_factor(&self) -> f32
Compute the drift factor as 1.0 + drift_pct_q8/256.
Trait Implementations§
Source§impl Clone for TierPolicy
impl Clone for TierPolicy
Source§fn clone(&self) -> TierPolicy
fn clone(&self) -> TierPolicy
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 TierPolicy
impl Debug for TierPolicy
Source§impl Default for TierPolicy
impl Default for TierPolicy
impl Copy for TierPolicy
Auto Trait Implementations§
impl Freeze for TierPolicy
impl RefUnwindSafe for TierPolicy
impl Send for TierPolicy
impl Sync for TierPolicy
impl Unpin for TierPolicy
impl UnsafeUnpin for TierPolicy
impl UnwindSafe for TierPolicy
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