pub struct StorageStats {
pub session_count: u32,
pub active_session_count: u32,
pub total_tokens: i64,
pub total_cost_usd: f64,
pub total_api_requests: u32,
}Expand description
Aggregated statistics across all sessions from the storage layer.
Provides a summary of session counts, token usage, costs, and API requests computed at the database level for efficiency.
Note: This is distinct from mi6_client::GlobalStats which includes
runtime OS metrics (CPU, memory) for TUI display.
Fields§
§session_count: u32Total number of sessions matching the query
active_session_count: u32Number of active sessions (ended_at IS NULL)
total_tokens: i64Total tokens across all sessions (input + output + cache_read + cache_write)
total_cost_usd: f64Total cost in USD across all sessions
total_api_requests: u32Total API requests across all sessions
Trait Implementations§
Source§impl Clone for StorageStats
impl Clone for StorageStats
Source§fn clone(&self) -> StorageStats
fn clone(&self) -> StorageStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StorageStats
impl Debug for StorageStats
Source§impl Default for StorageStats
impl Default for StorageStats
Source§fn default() -> StorageStats
fn default() -> StorageStats
Returns the “default value” for a type. Read more
Source§impl PartialEq for StorageStats
impl PartialEq for StorageStats
impl StructuralPartialEq for StorageStats
Auto Trait Implementations§
impl Freeze for StorageStats
impl RefUnwindSafe for StorageStats
impl Send for StorageStats
impl Sync for StorageStats
impl Unpin for StorageStats
impl UnwindSafe for StorageStats
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