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

Function extractUsageRecord

pkg/cli/token_usage.go:557–563  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

555}
556
557func extractUsageRecord(value any) map[string]any {
558 record, ok := value.(map[string]any)
559 if !ok {
560 return nil
561 }
562 return record
563}
564
565func usageNumericValue(parsed map[string]any, usage map[string]any, keys ...string) float64 {
566 for _, key := range keys {

Callers 2

processOneUsageJSONLFileFunction · 0.85
TestExtractUsageRecordFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestExtractUsageRecordFunction · 0.68