pub struct DataMatchingMetrics { /* private fields */ }Expand description
Metrics for data matching operations
Implementations§
Source§impl DataMatchingMetrics
impl DataMatchingMetrics
Sourcepub fn record_query(&self, success: bool, duration: Duration)
pub fn record_query(&self, success: bool, duration: Duration)
Record a query result
Sourcepub fn record_cache(&self, hit: bool, negative: bool)
pub fn record_cache(&self, hit: bool, negative: bool)
Record cache access
Sourcepub fn record_eviction(&self)
pub fn record_eviction(&self)
Record cache eviction
Sourcepub fn record_scan(&self, count: u64)
pub fn record_scan(&self, count: u64)
Record records scanned
Sourcepub fn record_match_type(
&self,
cpf: bool,
cnpj: bool,
fuzzy: bool,
cross_source: bool,
)
pub fn record_match_type( &self, cpf: bool, cnpj: bool, fuzzy: bool, cross_source: bool, )
Record match type
Sourcepub fn set_memory_usage(&self, bytes: usize)
pub fn set_memory_usage(&self, bytes: usize)
Update memory usage estimate
Sourcepub fn cache_hit_rate(&self) -> f64
pub fn cache_hit_rate(&self) -> f64
Get cache hit rate (0.0 - 1.0)
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Get success rate (0.0 - 1.0)
Sourcepub fn avg_processing_time_ms(&self) -> f64
pub fn avg_processing_time_ms(&self) -> f64
Get average processing time in milliseconds
Sourcepub fn peak_processing_time_ms(&self) -> f64
pub fn peak_processing_time_ms(&self) -> f64
Get peak processing time in milliseconds
Sourcepub fn throughput_rps(&self) -> f64
pub fn throughput_rps(&self) -> f64
Get throughput (records per second based on EMA)
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Get a snapshot of all metrics
Trait Implementations§
Source§impl Debug for DataMatchingMetrics
impl Debug for DataMatchingMetrics
Source§impl Default for DataMatchingMetrics
impl Default for DataMatchingMetrics
Source§fn default() -> DataMatchingMetrics
fn default() -> DataMatchingMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for DataMatchingMetrics
impl RefUnwindSafe for DataMatchingMetrics
impl Send for DataMatchingMetrics
impl Sync for DataMatchingMetrics
impl Unpin for DataMatchingMetrics
impl UnsafeUnpin for DataMatchingMetrics
impl UnwindSafe for DataMatchingMetrics
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