MCPcopy Create free account
hub / github.com/Louisym/MiniCC / TokenUsage

Class TokenUsage

mini_claude_code/runtime.py:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48# ============================================================
49
50class TokenUsage(BaseModel):
51 input_tokens: int = 0
52 output_tokens: int = 0
53 cache_creation_input_tokens: int = 0
54 cache_read_input_tokens: int = 0
55
56 def total_tokens(self) -> int:
57 """源码: usage.rs:81-86"""
58 return (
59 self.input_tokens
60 + self.output_tokens
61 + self.cache_creation_input_tokens
62 + self.cache_read_input_tokens
63 )
64
65
66# ============================================================

Callers 2

__init__Method · 0.70
recordMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected