pub struct CostStats {
pub total_tokens: u64,
pub total_cost: f64,
pub avg_tokens_per_unit: f64,
pub first_pass_rate: f64,
pub overall_pass_rate: f64,
pub most_expensive_unit: Option<UnitRef>,
pub most_retried_unit: Option<UnitRef>,
pub units_with_history: usize,
}Expand description
Cost and token statistics aggregated from RunRecord history.
Fields§
§total_tokens: u64§total_cost: f64§avg_tokens_per_unit: f64§first_pass_rate: f64Rate at which closed units passed on their first attempt (0.0–1.0).
overall_pass_rate: f64Rate at which attempted units eventually closed (0.0–1.0).
most_expensive_unit: Option<UnitRef>§most_retried_unit: Option<UnitRef>§units_with_history: usizeTrait Implementations§
Auto Trait Implementations§
impl Freeze for CostStats
impl RefUnwindSafe for CostStats
impl Send for CostStats
impl Sync for CostStats
impl Unpin for CostStats
impl UnsafeUnpin for CostStats
impl UnwindSafe for CostStats
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
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