pub struct StackTuner { /* private fields */ }Expand description
No state mutex is held while running a candidate, validator, profile, or disk operation. Contenders use the declared reference instead of waiting (also avoids nested-tuning deadlocks).
Implementations§
Source§impl StackTuner
impl StackTuner
pub fn new( policy: StackPolicy, cache_directory: Option<PathBuf>, ) -> Result<StackTuner, TuneFailure>
pub fn policy(&self) -> &StackPolicy
pub fn stats(&self) -> Stats
Sourcepub fn lower_level_fingerprint(&self) -> String
pub fn lower_level_fingerprint(&self) -> String
Conservative dependency snapshot for complete pipelines. It includes all currently cached lower-level decisions in this controller, including other workloads/devices. That may over-invalidate a pipeline but never hides a changed lower-level choice.
pub fn reports(&self) -> Vec<TuneReport>
pub fn select( &self, problem: &Problem, candidates: &[Candidate], reference: usize, runner: &mut impl TrialRunner, ) -> Result<Decision, TuneFailure>
Sourcepub fn invalidate(&self, decision: &Decision, ban_candidate: bool)
pub fn invalidate(&self, decision: &Decision, ban_candidate: bool)
Invalidate future selections; NEVER re-run the current stateful request after a failure.
Sourcepub fn record_comparison(
&self,
decision: &Decision,
reference: Duration,
selected: Duration,
correctness_checked: bool,
) -> Result<bool, TuneFailure>
pub fn record_comparison( &self, decision: &Decision, reference: Duration, selected: Duration, correctness_checked: bool, ) -> Result<bool, TuneFailure>
Feed paired observations from a controlled replay of the SAME workload and load regime. Ordinary production request latency is NOT a comparable baseline measurement.
Auto Trait Implementations§
impl !Freeze for StackTuner
impl RefUnwindSafe for StackTuner
impl Send for StackTuner
impl Sync for StackTuner
impl Unpin for StackTuner
impl UnsafeUnpin for StackTuner
impl UnwindSafe for StackTuner
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