pub struct SavingsSummary {
pub traces: usize,
pub enforce_traces: usize,
pub spent_usd: f64,
pub gate_usd: f64,
pub baseline_usd: f64,
pub savings_usd: f64,
pub savings_pct: f64,
}Expand description
Aggregated spend/savings over a set of traces — the number the operator screenshots.
Pure so it’s unit-testable; firstpass savings feeds it the trace store.
Fields§
§traces: usizeTraces aggregated.
enforce_traces: usizeEnforce-mode traces (the ones where routing actually decided).
spent_usd: f64USD actually spent (model + gate calls), summed over all traces.
gate_usd: f64USD spent on gates alone (the price of proof).
baseline_usd: f64What always calling the top rung would have cost (§9.1 counterfactual), summed.
savings_usd: f64baseline - spent — the savings the receipts prove.
savings_pct: f64Savings as a fraction of baseline, 0.0 when there is no baseline.
Trait Implementations§
Source§impl Debug for SavingsSummary
impl Debug for SavingsSummary
Auto Trait Implementations§
impl Freeze for SavingsSummary
impl RefUnwindSafe for SavingsSummary
impl Send for SavingsSummary
impl Sync for SavingsSummary
impl Unpin for SavingsSummary
impl UnsafeUnpin for SavingsSummary
impl UnwindSafe for SavingsSummary
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> 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 moreCreates a shared type from an unshared type.