MCPcopy Create free account
hub / github.com/Facets-cloud/flow / Usage

Struct Usage

internal/stats/scan.go:31–36  ·  view source on GitHub ↗

Usage is a token tally summed across a session's assistant turns.

Source from the content-addressed store, hash-verified

29
30// Usage is a token tally summed across a session's assistant turns.
31type Usage struct {
32 Input int64 `json:"input"`
33 Output int64 `json:"output"`
34 CacheCreation int64 `json:"cache_creation"`
35 CacheRead int64 `json:"cache_read"`
36}
37
38// Total is all tokens flow-managed sessions actually processed.
39func (u Usage) Total() int64 { return u.Input + u.Output + u.CacheCreation + u.CacheRead }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected