pub struct TurnMetrics {
pub input_tokens: u64,
pub output_tokens: u64,
pub cache_creation_tokens: u64,
pub cache_read_tokens: u64,
pub tool_call_count: usize,
pub failed_tool_calls: usize,
pub approval_count: usize,
pub verifier_count: usize,
pub retry_count: usize,
pub rollback_count: usize,
pub wall_time_ms: u64,
}Expand description
Aggregated turn metrics.
Fields§
§input_tokens: u64Total input tokens consumed.
output_tokens: u64Total output tokens produced.
cache_creation_tokens: u64Cache creation tokens.
cache_read_tokens: u64Cache read tokens.
tool_call_count: usizeTotal tool calls.
failed_tool_calls: usizeFailed tool calls.
approval_count: usizeApproval prompts shown.
verifier_count: usizeVerifier runs executed.
retry_count: usizeRetries triggered.
rollback_count: usizeRollbacks executed.
wall_time_ms: u64Wall time in milliseconds.
Trait Implementations§
Source§impl Clone for TurnMetrics
impl Clone for TurnMetrics
Source§impl Debug for TurnMetrics
impl Debug for TurnMetrics
Source§impl Default for TurnMetrics
impl Default for TurnMetrics
Source§impl<'de> Deserialize<'de> for TurnMetrics
impl<'de> Deserialize<'de> for TurnMetrics
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 TurnMetrics
impl RefUnwindSafe for TurnMetrics
impl Send for TurnMetrics
impl Sync for TurnMetrics
impl Unpin for TurnMetrics
impl UnsafeUnpin for TurnMetrics
impl UnwindSafe for TurnMetrics
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more