Core audit metrics
Total spend
The sum of all normalized call costs in the audit window.Observed spend
Spend taken directly from the telemetry source when a call already includes cost data.Estimated spend
Spend computed from token counts and Xerg’s pricing catalog when observed cost is missing.Waste spend
The dollar impact of findings classified as confirmedwaste.
Today that means:
- retry waste
- loop waste
- cache carryover for Cursor CSV audits when the billed pattern clears the waste bar
Opportunity spend
The dollar impact of findings classified asopportunity.
Today that means:
- context outliers
- idle spend
- downgrade candidates
- max mode concentration for Cursor CSV audits when the billed mix is heavily premium
Structural waste rate
--fail-above-waste-rate.
Breakdowns
Every audit includes spend breakdowns:- by workflow
- by model
spendUsdcallCountobservedShare
observedShare tells you what fraction of that row’s spend came from directly observed cost rather than estimation.
Daily rollups
Every audit now includes:spendByDaywasteByDay
YYYY-MM-DD format.
spendByDayincludesspendUsd,observedSpendUsd,estimatedSpendUsd, andcallCountwasteByDayincludes confirmed waste onlysum(spendByDay.spendUsd)reconciles tototalSpendUsdsum(wasteByDay.wasteUsd)reconciles towasteSpendUsd
Compare metrics
When a compatible baseline exists and you runxerg audit --compare, Xerg adds:
- delta total spend
- delta structural waste
- delta waste rate
- delta run count
- delta call count
- top workflow swings
- top model swings
- high-confidence waste changes
Notes that always matter
- Cost per outcome is intentionally unavailable in v0.
- Opportunity metrics are directional. They are worth testing, but they are not proven waste.
- Threshold gates only use confirmed structural waste, not opportunity impact.