Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
494 changes: 230 additions & 264 deletions .github/workflows/desktop-release-package.yml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions frontends/cost_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ def init_ledger(root: str) -> None:

def _append_ledger(thread_key: str, inp: int, out: int, cc: int, cr: int) -> None:
global _ledger_uncompacted_bytes
# TUI and conductor processes install the in-memory tracker but never call
# init_ledger(). Keep their historical hot path to one lock-free branch:
# no clock lookup, JSON encoding, byte counting, or ledger lock acquisition.
if _ledger_fd is None:
return
line = json.dumps(
{"t": time.time(), "k": thread_key, "i": inp, "o": out, "cc": cc, "cr": cr},
separators=(",", ":"),
Expand Down
Loading