pub struct Summary {
pub runs: u32,
pub usd: f64,
pub usage: TokenUsage,
pub unreported_runs: u32,
pub estimated_runs: u32,
}Expand description
Totals over some set of runs.
Fields§
§runs: u32How many runs contributed.
usd: f64Total cost in US dollars.
usage: TokenUsageTotal tokens.
unreported_runs: u32How many runs reported nothing at all.
estimated_runs: u32How many runs were priced from a rate card rather than measured.
Implementations§
Source§impl Summary
impl Summary
Sourcepub fn confidence(&self) -> CostSource
pub fn confidence(&self) -> CostSource
How much of this total is measured rather than inferred.
The weakest source wins: one unreported run in a hundred makes the whole figure a lower bound, and saying so is the point.
Fraction of runs whose cost the runner actually reported, from 0.0 to 1.0.
Returns 1.0 for an empty summary: nothing is unaccounted for when nothing has run.
Sourcepub fn is_fully_measured(&self) -> bool
pub fn is_fully_measured(&self) -> bool
Returns true when every figure in this total came from a runner.
Trait Implementations§
impl StructuralPartialEq for Summary
Auto Trait Implementations§
impl Freeze for Summary
impl RefUnwindSafe for Summary
impl Send for Summary
impl Sync for Summary
impl Unpin for Summary
impl UnsafeUnpin for Summary
impl UnwindSafe for Summary
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