pub struct UsageSummary {
pub events_seen: usize,
pub usage_events_seen: usize,
pub turn_results_seen: usize,
pub totals: UsageTotals,
pub cost: Option<CostTotals>,
}Expand description
Snapshot of everything a UsageReporter has tracked so far.
Retrieve this via UsageReporter::summary.
Fields§
§events_seen: usizeTotal number of AgentEvents observed (of any variant).
usage_events_seen: usizeNumber of events that carried usage information
(AgentEvent::UsageUpdated or AgentEvent::TurnFinished with usage).
turn_results_seen: usizeNumber of AgentEvent::TurnFinished events observed.
totals: UsageTotalsAggregated token counts.
cost: Option<CostTotals>Aggregated cost, present only if at least one event carried cost data.
Trait Implementations§
Source§impl Clone for UsageSummary
impl Clone for UsageSummary
Source§fn clone(&self) -> UsageSummary
fn clone(&self) -> UsageSummary
Returns a duplicate of the value. Read more
1.0.0 · 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 UsageSummary
impl Debug for UsageSummary
Source§impl Default for UsageSummary
impl Default for UsageSummary
Source§fn default() -> UsageSummary
fn default() -> UsageSummary
Returns the “default value” for a type. Read more
Source§impl PartialEq for UsageSummary
impl PartialEq for UsageSummary
impl StructuralPartialEq for UsageSummary
Auto Trait Implementations§
impl Freeze for UsageSummary
impl RefUnwindSafe for UsageSummary
impl Send for UsageSummary
impl Sync for UsageSummary
impl Unpin for UsageSummary
impl UnsafeUnpin for UsageSummary
impl UnwindSafe for UsageSummary
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