pub struct SessionMetrics {Show 14 fields
pub session_id: String,
pub model: String,
pub started_at: DateTime<Utc>,
pub completed_at: Option<DateTime<Utc>>,
pub total_rounds: u32,
pub total_token_usage: TokenUsage,
pub tool_call_count: u32,
pub tool_breakdown: HashMap<String, u32>,
pub status: SessionStatus,
pub message_count: u32,
pub duration_ms: Option<u64>,
pub prompt_cached_tool_outputs: u64,
pub total_compression_events: u64,
pub total_tokens_saved: u64,
}Expand description
Metrics for an entire session
Fields§
§session_id: StringUnique session identifier
model: StringModel used for this session
started_at: DateTime<Utc>When the session started
completed_at: Option<DateTime<Utc>>When the session completed
total_rounds: u32Total number of rounds in the session
total_token_usage: TokenUsageTotal token usage across all rounds
tool_call_count: u32Total number of tool calls
tool_breakdown: HashMap<String, u32>Breakdown of tool calls by tool name
status: SessionStatusSession execution status
message_count: u32Total number of messages exchanged
duration_ms: Option<u64>Session duration in milliseconds
prompt_cached_tool_outputs: u64Total number of prompt-side cached tool outputs observed across rounds.
total_compression_events: u64Total number of context compression events across all rounds.
total_tokens_saved: u64Total tokens saved by context compression across all rounds.
Trait Implementations§
Source§impl Clone for SessionMetrics
impl Clone for SessionMetrics
Source§fn clone(&self) -> SessionMetrics
fn clone(&self) -> SessionMetrics
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 SessionMetrics
impl Debug for SessionMetrics
Source§impl<'de> Deserialize<'de> for SessionMetrics
impl<'de> Deserialize<'de> for SessionMetrics
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 SessionMetrics
impl PartialEq for SessionMetrics
Source§impl Serialize for SessionMetrics
impl Serialize for SessionMetrics
impl StructuralPartialEq for SessionMetrics
Auto Trait Implementations§
impl Freeze for SessionMetrics
impl RefUnwindSafe for SessionMetrics
impl Send for SessionMetrics
impl Sync for SessionMetrics
impl Unpin for SessionMetrics
impl UnsafeUnpin for SessionMetrics
impl UnwindSafe for SessionMetrics
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