MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / CostTracker

Class CostTracker

claw-code/src/cost_tracker.py:7–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6@dataclass
7class CostTracker:
8 total_units: int = 0
9 events: list[str] = field(default_factory=list)
10
11 def record(self, label: str, units: int) -> None:
12 self.total_units += units
13 self.events.append(f'{label}:{units}')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected