pub struct SessionStats {
pub session_id: Uuid,
pub message_count: u64,
pub tool_call_count: u64,
pub tool_success_count: u64,
pub tool_failure_count: u64,
pub total_input_tokens: u64,
pub total_output_tokens: u64,
pub total_tokens: u64,
pub avg_tool_duration_ms: u64,
}Expand description
Pre-computed or live-aggregated statistics for a session.
Provides a summary view including message count, tool execution counts (total / success / failure), cumulative token usage, and average tool execution duration.
Fields§
§session_id: UuidSession identifier.
message_count: u64Total number of messages in the session.
tool_call_count: u64Total number of tool executions.
tool_success_count: u64Number of successful tool executions.
tool_failure_count: u64Number of failed tool executions.
total_input_tokens: u64Cumulative input tokens across all provider calls.
total_output_tokens: u64Cumulative output tokens across all provider calls.
total_tokens: u64Cumulative total tokens.
avg_tool_duration_ms: u64Average tool execution duration in milliseconds.
Implementations§
Trait Implementations§
Source§impl Clone for SessionStats
impl Clone for SessionStats
Source§fn clone(&self) -> SessionStats
fn clone(&self) -> SessionStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SessionStats
impl Debug for SessionStats
Source§impl<'de> Deserialize<'de> for SessionStats
impl<'de> Deserialize<'de> for SessionStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SessionStats
impl PartialEq for SessionStats
Source§fn eq(&self, other: &SessionStats) -> bool
fn eq(&self, other: &SessionStats) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SessionStats
impl Serialize for SessionStats
impl StructuralPartialEq for SessionStats
Auto Trait Implementations§
impl Freeze for SessionStats
impl RefUnwindSafe for SessionStats
impl Send for SessionStats
impl Sync for SessionStats
impl Unpin for SessionStats
impl UnsafeUnpin for SessionStats
impl UnwindSafe for SessionStats
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