pub struct ClawStats {
pub total_memories: u64,
pub cache_hit_rate: f64,
pub last_snapshot_at: Option<DateTime<Utc>>,
pub db_size_bytes: u64,
pub wal_size_bytes: u64,
}Expand description
Comprehensive runtime statistics for a ClawEngine instance.
Retrieve via ClawEngine::stats.
§Example
let s = engine.stats().await?;
println!("hit rate (last 1 000 ops): {:.1}%", s.cache_hit_rate * 100.0);Fields§
§total_memories: u64Total number of memory records currently stored.
cache_hit_rate: f64Cache hit rate over the most recent 1 000 lookup operations (0.0 – 1.0).
last_snapshot_at: Option<DateTime<Utc>>Timestamp of the most recently created snapshot, or None if no
snapshot has been taken during this engine session.
db_size_bytes: u64Size of the main database file in bytes.
wal_size_bytes: u64Size of the WAL file in bytes (0 if WAL is not enabled or not present).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClawStats
impl RefUnwindSafe for ClawStats
impl Send for ClawStats
impl Sync for ClawStats
impl Unpin for ClawStats
impl UnsafeUnpin for ClawStats
impl UnwindSafe for ClawStats
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