pub struct IndexMetrics { /* private fields */ }Expand description
Metrics for index lifecycle management and degradation detection.
Implementations§
Source§impl IndexMetrics
impl IndexMetrics
Sourcepub fn new() -> IndexMetrics
pub fn new() -> IndexMetrics
Create new metrics with default threshold (10 pending parses).
Sourcepub fn with_threshold(threshold: usize) -> IndexMetrics
pub fn with_threshold(threshold: usize) -> IndexMetrics
Create new metrics with custom parse storm threshold.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Get current pending parse count (lock-free).
Sourcepub fn increment_pending_parses(&self) -> usize
pub fn increment_pending_parses(&self) -> usize
Increment pending parse count and return the new value.
Sourcepub fn decrement_pending_parses(&self) -> usize
pub fn decrement_pending_parses(&self) -> usize
Decrement pending parse count and return the new value.
Sourcepub fn is_parse_storm(&self) -> bool
pub fn is_parse_storm(&self) -> bool
Determine whether the current pending parse count exceeds the threshold.
Sourcepub fn parse_storm_threshold(&self) -> usize
pub fn parse_storm_threshold(&self) -> usize
Get the parse-storm threshold.
Trait Implementations§
Source§impl Default for IndexMetrics
impl Default for IndexMetrics
Source§fn default() -> IndexMetrics
fn default() -> IndexMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for IndexMetrics
impl RefUnwindSafe for IndexMetrics
impl Send for IndexMetrics
impl Sync for IndexMetrics
impl Unpin for IndexMetrics
impl UnsafeUnpin for IndexMetrics
impl UnwindSafe for IndexMetrics
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