pub struct WorkloadClassifier { /* private fields */ }Expand description
RL-based workload classifier with UCB1 algorithm
Implementations§
Source§impl WorkloadClassifier
impl WorkloadClassifier
Sourcepub fn record_point_read(&self)
pub fn record_point_read(&self)
Record a point read
Sourcepub fn record_range_scan(&self)
pub fn record_range_scan(&self)
Record a range scan
Sourcepub fn record_insert(&self)
pub fn record_insert(&self)
Record an insert
Sourcepub fn record_update(&self)
pub fn record_update(&self)
Record an update
Sourcepub fn record_delete(&self)
pub fn record_delete(&self)
Record a delete
Sourcepub fn record_vector_search(&self)
pub fn record_vector_search(&self)
Record a vector search
Sourcepub fn extract_features(&self) -> FeatureVector
pub fn extract_features(&self) -> FeatureVector
Extract features from operation counters
Sourcepub fn workload_type(&self) -> WorkloadType
pub fn workload_type(&self) -> WorkloadType
Get the current workload type
Sourcepub fn current_config(&self) -> TuningConfig
pub fn current_config(&self) -> TuningConfig
Get the current tuning configuration
Sourcepub fn start_reward_measurement(&self)
pub fn start_reward_measurement(&self)
Start measuring reward (throughput)
Sourcepub fn end_reward_measurement(&self)
pub fn end_reward_measurement(&self)
End measurement and update the bandit
Sourcepub fn select_arm(&self) -> usize
pub fn select_arm(&self) -> usize
Select the next arm using UCB1
Sourcepub fn update_config(&self)
pub fn update_config(&self)
Update the configuration based on current workload
Sourcepub fn stats(&self) -> ClassifierStats
pub fn stats(&self) -> ClassifierStats
Get statistics
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WorkloadClassifier
impl RefUnwindSafe for WorkloadClassifier
impl Send for WorkloadClassifier
impl Sync for WorkloadClassifier
impl Unpin for WorkloadClassifier
impl UnsafeUnpin for WorkloadClassifier
impl UnwindSafe for WorkloadClassifier
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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