repo_description: The repo is finally unlocked. enjoy the party! The fastest repo in history to surpass 100K stars ⭐. Join Discord: https://discord.gg/5TUQKqFWd Built in Rust using oh-my-codex.
code: from __future__ import annotations
  
  from dataclasses import dataclass, field
  
  
  @dataclass
  class CostTracker:
      total_units: int = 0
      events: list[str] = field(default_factory=list)
  
      def record(self, label: str, units: int) -> None:
          self.total_units += units
          self.events.append(f'{label}:{units}')
  