pub struct TokenOverview {Show 23 fields
pub estimate_kind: String,
pub estimator: String,
pub estimate_scope: String,
pub calls: usize,
pub estimated_without_projectatlas: usize,
pub estimated_with_projectatlas: usize,
pub estimated_saved: isize,
pub savings_rate: Option<f64>,
pub buckets: Vec<TokenBucketOverview>,
pub measured_tokens_saved: isize,
pub gross_modeled_tokens_avoided: isize,
pub deduped_modeled_tokens_avoided: isize,
pub tokens_avoided: isize,
pub legacy_gross_estimated_saved: isize,
pub repeated_baselines_deduped: usize,
pub observed_file_read_replacements: usize,
pub modeled_file_reads_avoided: usize,
pub likely_file_reads_avoided: usize,
pub read_avoidance_scope: String,
pub read_avoidance_confidence: String,
pub calibration: Option<TokenCalibrationOverview>,
pub detail_availability: UsageDetailAvailability,
pub agent_efficiency: AgentEfficiencyComparison,
}Expand description
Token savings overview.
Fields§
§estimate_kind: StringCounting mode for the reported numbers.
estimator: StringEstimator used to produce the reported numbers.
estimate_scope: StringScope and accuracy boundary for the reported numbers.
calls: usizeNumber of tracked calls.
estimated_without_projectatlas: usizeTotal baseline estimate.
estimated_with_projectatlas: usizeTotal ProjectAtlas estimate.
estimated_saved: isizeTotal saved tokens.
savings_rate: Option<f64>Signed savings ratio, or None when the baseline estimate is zero.
buckets: Vec<TokenBucketOverview>Bucketed token savings grouped by baseline and accuracy semantics.
measured_tokens_saved: isizeObserved before/after saved tokens.
gross_modeled_tokens_avoided: isizeGross modeled avoided-token estimate before dedupe.
deduped_modeled_tokens_avoided: isizeDeduped modeled avoided-token estimate.
tokens_avoided: isizeConservative headline tokens avoided estimate.
legacy_gross_estimated_saved: isizeLegacy all-bucket gross estimate retained for migration diagnostics.
repeated_baselines_deduped: usizeNumber of duplicate modeled baseline events collapsed by dedupe.
observed_file_read_replacements: usizeObserved ProjectAtlas summary/search/slice calls compared with whole-file reads.
modeled_file_reads_avoided: usizeModeled ProjectAtlas navigation calls that likely avoided whole-file reads.
likely_file_reads_avoided: usizeTotal likely whole-file reads avoided.
read_avoidance_scope: StringScope label for read-avoidance counters.
read_avoidance_confidence: StringConfidence label for read-avoidance counters.
calibration: Option<TokenCalibrationOverview>Optional local tokenizer calibration for indexed UTF-8 files.
detail_availability: UsageDetailAvailabilityAvailability of caller-label and retained raw detail for this report.
agent_efficiency: AgentEfficiencyComparisonOptional validated controlled benchmark evidence kept separate from live accounting.
Implementations§
Source§impl TokenOverview
impl TokenOverview
Sourcepub fn from_events(events: &[UsageEvent]) -> Self
pub fn from_events(events: &[UsageEvent]) -> Self
Build an overview from usage events.
Sourcepub fn from_estimated_totals(calls: u128, without: u128, with: u128) -> Self
pub fn from_estimated_totals(calls: u128, without: u128, with: u128) -> Self
Build an overview from aggregate heuristic token totals.
Sourcepub fn from_buckets(buckets: Vec<TokenBucketOverview>) -> Self
pub fn from_buckets(buckets: Vec<TokenBucketOverview>) -> Self
Build an overview from pre-aggregated buckets.
Sourcepub fn set_calibration(&mut self, calibration: TokenCalibrationOverview)
pub fn set_calibration(&mut self, calibration: TokenCalibrationOverview)
Attach a local tokenizer calibration section.
Sourcepub fn set_agent_efficiency(&mut self, comparison: AgentEfficiencyComparison)
pub fn set_agent_efficiency(&mut self, comparison: AgentEfficiencyComparison)
Attach one validated controlled benchmark comparison.
Sourcepub fn apply_accounting_totals(&mut self, totals: TokenAccountingTotals)
pub fn apply_accounting_totals(&mut self, totals: TokenAccountingTotals)
Apply exact separated accounting totals loaded from durable aggregates.
Sourcepub const fn set_detail_availability(
&mut self,
availability: UsageDetailAvailability,
)
pub const fn set_detail_availability( &mut self, availability: UsageDetailAvailability, )
Set the truth state for caller-label and retained raw detail.
Sourcepub fn apply_accounting_from_events(&mut self, events: &[UsageEvent])
pub fn apply_accounting_from_events(&mut self, events: &[UsageEvent])
Apply separated measured/modeled accounting totals from raw usage events.
Trait Implementations§
Source§impl Clone for TokenOverview
impl Clone for TokenOverview
Source§fn clone(&self) -> TokenOverview
fn clone(&self) -> TokenOverview
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more