pub struct StatisticsCache { /* private fields */ }Expand description
Cache for statistical computations
Implementations§
Source§impl StatisticsCache
impl StatisticsCache
Sourcepub fn get_or_compute_expected_value<F>(
&self,
id: Uuid,
sample_count: usize,
compute: F,
) -> f64
pub fn get_or_compute_expected_value<F>( &self, id: Uuid, sample_count: usize, compute: F, ) -> f64
Cache expected value computation
Sourcepub fn get_or_compute_variance<F>(
&self,
id: Uuid,
sample_count: usize,
compute: F,
) -> f64
pub fn get_or_compute_variance<F>( &self, id: Uuid, sample_count: usize, compute: F, ) -> f64
Cache variance computation
Sourcepub fn get_or_compute_std_dev<F>(
&self,
id: Uuid,
sample_count: usize,
compute: F,
) -> f64
pub fn get_or_compute_std_dev<F>( &self, id: Uuid, sample_count: usize, compute: F, ) -> f64
Cache standard deviation computation
Sourcepub fn get_or_compute_skewness<F>(
&self,
id: Uuid,
sample_count: usize,
compute: F,
) -> f64
pub fn get_or_compute_skewness<F>( &self, id: Uuid, sample_count: usize, compute: F, ) -> f64
Cache skewness computation
Sourcepub fn get_or_compute_kurtosis<F>(
&self,
id: Uuid,
sample_count: usize,
compute: F,
) -> f64
pub fn get_or_compute_kurtosis<F>( &self, id: Uuid, sample_count: usize, compute: F, ) -> f64
Cache kurtosis computation
Sourcepub fn get_or_compute_confidence_interval<F>(
&self,
id: Uuid,
sample_count: usize,
confidence: f64,
compute: F,
) -> (f64, f64)
pub fn get_or_compute_confidence_interval<F>( &self, id: Uuid, sample_count: usize, confidence: f64, compute: F, ) -> (f64, f64)
Cache confidence interval computation
Sourcepub fn get_or_compute_cdf<F>(
&self,
id: Uuid,
sample_count: usize,
value: f64,
compute: F,
) -> f64
pub fn get_or_compute_cdf<F>( &self, id: Uuid, sample_count: usize, value: f64, compute: F, ) -> f64
Cache CDF computation
Sourcepub fn get_or_compute_quantile<F>(
&self,
id: Uuid,
sample_count: usize,
q: f64,
compute: F,
) -> f64
pub fn get_or_compute_quantile<F>( &self, id: Uuid, sample_count: usize, q: f64, compute: F, ) -> f64
Cache quantile computation
Sourcepub fn cleanup_all_expired(&self)
pub fn cleanup_all_expired(&self)
Clean up expired entries in all caches
Sourcepub fn overall_stats(&self) -> CacheStats
pub fn overall_stats(&self) -> CacheStats
Get overall cache statistics across all caches
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StatisticsCache
impl RefUnwindSafe for StatisticsCache
impl Send for StatisticsCache
impl Sync for StatisticsCache
impl Unpin for StatisticsCache
impl UnsafeUnpin for StatisticsCache
impl UnwindSafe for StatisticsCache
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