mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3053] serve: lifetime token totals + a Codex-style daily activity heatmap in the monitor #1224
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1224
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wangzc1997 on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3053
The monitor is genuinely lovely. Two small additions around it would let it answer the question I keep getting asked: "how much have I been using this machine?" They share one mechanism — persistent per-day counters — so filing them together.
1. Lifetime token totals (across restarts)
The monitor already shows a per-session line under the request list ("Since : N requests · X prompt tokens read (Y reused) · Z written"), and
/metricstotalsmatches it — but both restart from zero every timeservestarts. For a machine that runs Strata 24/7 across many restarts, the number I actually want is the lifetime total: how many tokens this install has served so far.Suggestion:
totals_lifetimein/metricsnext to the existing session totals; current fields unchanged.The increment site already exists where
totalsis maintained; the new work is mainly flushing the counters on shutdown / SIGTERM (including Windows terminate).2. A Codex-style daily activity heatmap
The Codex CLI shows a token activity grid: one square per day, weeks as columns, shaded by that day's token count, with 每天 / 每周 / 累计总量 (daily / weekly / cumulative) toggles. It makes usage patterns obvious at a glance, and with the per-day buckets from (1) the data is already there.
Context
Until now I reconstruct both by parsing "[strata] done: N tokens" and "prompt N tokens = ..." log lines — workable, but older logs omit the prompt field for small prompts, so those can only be estimated. A first-class counter would be far more reliable, and the heatmap would make the monitor even better than it already is.
Environment: v0.1.44.1, Windows 11.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.