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

Function countAPIProxySteeringEvents

pkg/cli/token_usage.go:765–776  ·  view source on GitHub ↗
(runDir string)

Source from the content-addressed store, hash-verified

763}
764
765func countAPIProxySteeringEvents(runDir string) int {
766 eventsPath := findAPIProxyEventsFile(runDir)
767 if eventsPath == "" {
768 return 0
769 }
770 count, err := parseAPIProxySteeringEvents(eventsPath)
771 if err != nil {
772 tokenUsageLog.Printf("Failed to parse API proxy events file %s: %v", eventsPath, err)
773 return 0
774 }
775 return count
776}
777
778func findAPIProxyEventsFile(runDir string) string {
779 primary := filepath.Join(runDir, "sandbox", "firewall", "logs", proxyEventsJSONLPath)

Callers 1

analyzeTokenUsageFunction · 0.85

Calls 3

findAPIProxyEventsFileFunction · 0.85
PrintfMethod · 0.45

Tested by

no test coverage detected