pub struct UsageMetricsAgentMetric {
pub agent_display_name: Option<String>,
pub agent_name: Option<String>,
pub model_metrics: HashMap<String, UsageMetricsModelMetric>,
pub total_api_duration_ms: i64,
pub total_nano_aiu: f64,
}Expand description
Usage attributed to one agent instance, including its identity, API duration, AI units, and per-model breakdown.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§agent_display_name: Option<String>Human-readable label for this subagent invocation, copied from the originating subagent.started event. For task-tool subagents this is the invocation’s task description rather than the agent’s configured display name, so group by agentName for stable per-agent labels.
agent_name: Option<String>Configured agent name, when this is a subagent
model_metrics: HashMap<String, UsageMetricsModelMetric>Per-model usage for this agent, keyed by model identifier
total_api_duration_ms: i64Time spent in model API calls by this agent, in milliseconds
total_nano_aiu: f64Accumulated nano-AI units cost for this agent
Trait Implementations§
Source§impl Clone for UsageMetricsAgentMetric
impl Clone for UsageMetricsAgentMetric
Source§fn clone(&self) -> UsageMetricsAgentMetric
fn clone(&self) -> UsageMetricsAgentMetric
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 UsageMetricsAgentMetric
impl Debug for UsageMetricsAgentMetric
Source§impl Default for UsageMetricsAgentMetric
impl Default for UsageMetricsAgentMetric
Source§fn default() -> UsageMetricsAgentMetric
fn default() -> UsageMetricsAgentMetric
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UsageMetricsAgentMetric
impl<'de> Deserialize<'de> for UsageMetricsAgentMetric
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
Auto Trait Implementations§
impl Freeze for UsageMetricsAgentMetric
impl RefUnwindSafe for UsageMetricsAgentMetric
impl Send for UsageMetricsAgentMetric
impl Sync for UsageMetricsAgentMetric
impl Unpin for UsageMetricsAgentMetric
impl UnsafeUnpin for UsageMetricsAgentMetric
impl UnwindSafe for UsageMetricsAgentMetric
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