pub struct EtpaoMetrics {Show 13 fields
pub scope: String,
pub tokens_input: u64,
pub tokens_output: u64,
pub tokens_reasoning: u64,
pub tokens_schema: u64,
pub tokens_retry: u64,
pub tokens_cache_write: u64,
pub tokens_handoff: u64,
pub accepted_outcomes: u64,
pub first_pass_successes: u64,
pub total_requests: u64,
pub cache_hits: u64,
pub cache_misses: u64,
}Expand description
Aggregated token efficiency metrics for a single scope (project/agent/model).
Fields§
§scope: String§tokens_input: u64§tokens_output: u64§tokens_reasoning: u64§tokens_schema: u64§tokens_retry: u64§tokens_cache_write: u64§tokens_handoff: u64§accepted_outcomes: u64§first_pass_successes: u64§total_requests: u64§cache_hits: u64§cache_misses: u64Implementations§
Source§impl EtpaoMetrics
impl EtpaoMetrics
Sourcepub fn first_pass_success_rate(&self) -> f64
pub fn first_pass_success_rate(&self) -> f64
Returns the fraction of requests accepted on the first pass.
Sourcepub fn cache_hit_rate(&self) -> f64
pub fn cache_hit_rate(&self) -> f64
Returns cache hits as a fraction of total requests.
Sourcepub fn merge(&mut self, other: &EtpaoMetrics)
pub fn merge(&mut self, other: &EtpaoMetrics)
Adds another scope’s counters to this metric set.
Trait Implementations§
Source§impl Clone for EtpaoMetrics
impl Clone for EtpaoMetrics
Source§fn clone(&self) -> EtpaoMetrics
fn clone(&self) -> EtpaoMetrics
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 EtpaoMetrics
impl Debug for EtpaoMetrics
Source§impl Default for EtpaoMetrics
impl Default for EtpaoMetrics
Source§fn default() -> EtpaoMetrics
fn default() -> EtpaoMetrics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EtpaoMetrics
impl<'de> Deserialize<'de> for EtpaoMetrics
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 EtpaoMetrics
impl RefUnwindSafe for EtpaoMetrics
impl Send for EtpaoMetrics
impl Sync for EtpaoMetrics
impl Unpin for EtpaoMetrics
impl UnsafeUnpin for EtpaoMetrics
impl UnwindSafe for EtpaoMetrics
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>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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