pub struct RuntimeMetrics {
pub active_sessions: AtomicUsize,
pub total_sessions: AtomicU64,
pub total_steps: AtomicU64,
pub total_tool_calls: AtomicU64,
pub failed_tool_calls: AtomicU64,
pub backpressure_shed_count: AtomicU64,
pub memory_recall_count: AtomicU64,
}Expand description
Shared runtime metrics. Clone the Arc to share across threads.
Fields§
§active_sessions: AtomicUsizeNumber of agent sessions currently in progress.
total_sessions: AtomicU64Total number of sessions started since the runtime was created.
total_steps: AtomicU64Total number of ReAct steps executed across all sessions.
total_tool_calls: AtomicU64Total number of tool calls dispatched.
failed_tool_calls: AtomicU64Total number of tool calls that returned an error observation.
backpressure_shed_count: AtomicU64Total number of requests shed due to backpressure.
memory_recall_count: AtomicU64Total number of memory recall operations.
Implementations§
Source§impl RuntimeMetrics
impl RuntimeMetrics
Sourcepub fn active_sessions(&self) -> usize
pub fn active_sessions(&self) -> usize
Return the number of agent sessions currently in progress.
Sourcepub fn total_sessions(&self) -> u64
pub fn total_sessions(&self) -> u64
Return the total number of sessions started since the runtime was created.
Sourcepub fn total_steps(&self) -> u64
pub fn total_steps(&self) -> u64
Return the total number of ReAct steps executed across all sessions.
Sourcepub fn total_tool_calls(&self) -> u64
pub fn total_tool_calls(&self) -> u64
Return the total number of tool calls dispatched.
Sourcepub fn failed_tool_calls(&self) -> u64
pub fn failed_tool_calls(&self) -> u64
Return the total number of tool calls that returned an error observation.
Sourcepub fn backpressure_shed_count(&self) -> u64
pub fn backpressure_shed_count(&self) -> u64
Return the total number of requests shed due to backpressure.
Sourcepub fn memory_recall_count(&self) -> u64
pub fn memory_recall_count(&self) -> u64
Return the total number of memory recall operations performed.