pub struct TurnMetrics {
pub turn: u32,
pub tools_exposed: usize,
pub tools_called: usize,
pub active_skill: Option<String>,
pub input_tokens: u32,
pub cache_read_tokens: u32,
pub cache_creation_tokens: u32,
pub cache_read_tokens_by_slot: Option<CacheReadBySlot>,
}Expand description
P0-C tool-gating telemetry: per-LLM-turn metrics, delivered to RuntimeOptions::on_turn_metrics.
Pure observation — no behavior change. tools_exposed vs tools_called quantifies over-exposure;
consecutive equal active_skill values measure skill dwell D; the cache split gives the
prompt-cache hit baseline. Mirrors the node SDK TurnMetrics.
Fields§
§turn: u32§tools_exposed: usize§tools_called: usize§active_skill: Option<String>§input_tokens: u32§cache_read_tokens: u32§cache_creation_tokens: u32§cache_read_tokens_by_slot: Option<CacheReadBySlot>I1: pro-rata per-slot attribution of cache_read_tokens (Anthropic only). Mirrors Node.
Trait Implementations§
Source§impl Clone for TurnMetrics
impl Clone for TurnMetrics
Source§fn clone(&self) -> TurnMetrics
fn clone(&self) -> TurnMetrics
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 moreAuto 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