Usage returns a consistent snapshot of the cumulative input/output token counts.
()
| 561 | // Usage returns a consistent snapshot of the cumulative input/output |
| 562 | // token counts. |
| 563 | func (s *Session) Usage() (input, output int64) { |
| 564 | s.mu.RLock() |
| 565 | defer s.mu.RUnlock() |
| 566 | return s.InputTokens, s.OutputTokens |
| 567 | } |
| 568 | |
| 569 | // ApplyCompaction atomically resets the session's cumulative token |
| 570 | // counts and appends a summary item under s.mu so concurrent readers |
no outgoing calls
no test coverage detected