pub struct Controller { /* private fields */ }Expand description
The adaptive-profile state machine, evaluated at epoch boundaries.
Implementations§
Source§impl Controller
impl Controller
Sourcepub fn new(opening: ProfileKind, fast_writers: usize) -> Self
pub fn new(opening: ProfileKind, fast_writers: usize) -> Self
opening is the probe-chosen starting state; fast_writers is the
FAST profile’s writer count (the growth ceiling in auto mode).
Sourcepub fn for_compressed_output(self) -> Self
pub fn for_compressed_output(self) -> Self
Freeze the controller for compressed-output runs: no transitions (the epoch signals cannot distinguish a CPU-bound encoder from a slow device) and immediate writer growth when the opening state is SSD.
Sourcepub fn state(&self) -> ProfileKind
pub fn state(&self) -> ProfileKind
Current state.
Sourcepub fn on_epoch(&mut self, m: &EpochMeasurement) -> EpochDecision
pub fn on_epoch(&mut self, m: &EpochMeasurement) -> EpochDecision
Evaluate one epoch boundary. Pure: no clocks, no I/O.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Controller
impl RefUnwindSafe for Controller
impl Send for Controller
impl Sync for Controller
impl Unpin for Controller
impl UnsafeUnpin for Controller
impl UnwindSafe for Controller
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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