pub struct Metrics {Show 16 fields
pub writes_total: AtomicU64,
pub reads_total: AtomicU64,
pub deletes_total: AtomicU64,
pub cache_hits: AtomicU64,
pub cache_misses: AtomicU64,
pub wal_syncs: AtomicU64,
pub context_assemblies: AtomicU64,
pub mql_queries_parsed: AtomicU64,
pub contradictions_detected: AtomicU64,
pub beliefs_propagated: AtomicU64,
pub speculative_hits: AtomicU64,
pub speculative_misses: AtomicU64,
pub write_latency_us_sum: AtomicU64,
pub write_latency_count: AtomicU64,
pub read_latency_us_sum: AtomicU64,
pub read_latency_count: AtomicU64,
}Expand description
Atomic counters for all MenteDB operations.
Fields§
§writes_total: AtomicU64Total write operations.
reads_total: AtomicU64Total read operations.
deletes_total: AtomicU64Total delete operations.
cache_hits: AtomicU64Cache hits.
cache_misses: AtomicU64Cache misses.
wal_syncs: AtomicU64WAL sync operations.
context_assemblies: AtomicU64Context assembly operations.
mql_queries_parsed: AtomicU64MQL queries parsed.
contradictions_detected: AtomicU64Contradictions detected.
beliefs_propagated: AtomicU64Beliefs propagated.
speculative_hits: AtomicU64Speculative cache hits.
speculative_misses: AtomicU64Speculative cache misses.
write_latency_us_sum: AtomicU64Sum of write latencies in microseconds.
write_latency_count: AtomicU64Number of write latency samples.
read_latency_us_sum: AtomicU64Sum of read latencies in microseconds.
read_latency_count: AtomicU64Number of read latency samples.
Implementations§
Source§impl Metrics
impl Metrics
Sourcepub fn inc_writes(&self)
pub fn inc_writes(&self)
Increment writes counter.
Sourcepub fn inc_deletes(&self)
pub fn inc_deletes(&self)
Increment deletes counter.
Sourcepub fn inc_cache_hits(&self)
pub fn inc_cache_hits(&self)
Increment cache hits counter.
Sourcepub fn inc_cache_misses(&self)
pub fn inc_cache_misses(&self)
Increment cache misses counter.
Sourcepub fn record_write_latency(&self, microseconds: u64)
pub fn record_write_latency(&self, microseconds: u64)
Record a write latency sample.
Sourcepub fn record_read_latency(&self, microseconds: u64)
pub fn record_read_latency(&self, microseconds: u64)
Record a read latency sample.
Sourcepub fn export_prometheus(&self) -> String
pub fn export_prometheus(&self) -> String
Export metrics in Prometheus text exposition format.
Sourcepub fn export_json(&self) -> String
pub fn export_json(&self) -> String
Export metrics as a JSON string.
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Take a point-in-time snapshot of all metrics.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
impl UnwindSafe for Metrics
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