pub struct MetricsCollector { /* private fields */ }Expand description
Collects runtime statistics about index operations using lock-free atomic counters.
Implementations§
Source§impl MetricsCollector
impl MetricsCollector
pub fn new() -> Self
pub fn record_query(&self, candidates: u64, duration_ns: u64)
pub fn record_insert(&self)
pub fn record_bucket_hit(&self)
pub fn record_bucket_miss(&self)
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Take a point-in-time snapshot of all metrics.
Trait Implementations§
Source§impl Debug for MetricsCollector
impl Debug for MetricsCollector
Source§impl Default for MetricsCollector
impl Default for MetricsCollector
Source§fn default() -> MetricsCollector
fn default() -> MetricsCollector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MetricsCollector
impl RefUnwindSafe for MetricsCollector
impl Send for MetricsCollector
impl Sync for MetricsCollector
impl Unpin for MetricsCollector
impl UnsafeUnpin for MetricsCollector
impl UnwindSafe for MetricsCollector
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