pub struct BloomStats {
pub definite_negatives: u64,
pub potential_positives: u64,
pub true_positives: u64,
pub false_positives: u64,
}Expand description
Statistics for Bloom filter performance
Fields§
§definite_negatives: u64Number of definite negatives (avoided DB queries)
potential_positives: u64Number of potential positives (required DB queries)
true_positives: u64Number of true positives (confirmed by DB)
false_positives: u64Number of false positives (not found in DB despite Bloom saying yes)
Implementations§
Source§impl BloomStats
impl BloomStats
Sourcepub fn query_reduction_rate(&self) -> f64
pub fn query_reduction_rate(&self) -> f64
Calculate the DB query reduction rate
Sourcepub fn actual_fp_rate(&self) -> f64
pub fn actual_fp_rate(&self) -> f64
Calculate the actual false positive rate
Trait Implementations§
Source§impl Clone for BloomStats
impl Clone for BloomStats
Source§fn clone(&self) -> BloomStats
fn clone(&self) -> BloomStats
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 BloomStats
impl Debug for BloomStats
Source§impl Default for BloomStats
impl Default for BloomStats
Source§fn default() -> BloomStats
fn default() -> BloomStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BloomStats
impl RefUnwindSafe for BloomStats
impl Send for BloomStats
impl Sync for BloomStats
impl Unpin for BloomStats
impl UnwindSafe for BloomStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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