MCPcopy Create free account
hub / github.com/github/gh-aw / populateAIC

Function populateAIC

pkg/cli/token_usage.go:1113–1128  ·  view source on GitHub ↗
(summary *TokenUsageSummary)

Source from the content-addressed store, hash-verified

1111}
1112
1113func populateAIC(summary *TokenUsageSummary) {
1114 if summary == nil {
1115 return
1116 }
1117
1118 total := 0.0
1119 for model, usage := range summary.ByModel {
1120 if usage == nil {
1121 continue
1122 }
1123 aic := computeModelInferenceAIC(usage.Provider, model, usage.InputTokens, usage.OutputTokens, usage.CacheReadTokens, usage.CacheWriteTokens, usage.ReasoningTokens)
1124 usage.AIC = aic
1125 total += aic
1126 }
1127 summary.TotalAIC = total
1128}

Callers 2

parseTokenUsageFileFunction · 0.85
parseAgentUsageFileFunction · 0.85

Calls 1

computeModelInferenceAICFunction · 0.85

Tested by

no test coverage detected