jasonchia58 on X (macOS, v0.1.3119): the number at the top right of Library → RTK's chart (1.6M) stopped changing, while the total under the chart kept growing. That number is the bars' scale: the busiest day's (or week's) input in the range, shown bare since5b43bdd61. It changes only when a day passes the old busiest, so it read as a stuck total. Nothing on main changed it since 3119. It now says "peak day 1.2M" / "peak week 1.2M" (zh 单日最高, zh-TW 單日最高, ja 1日の最大, de Stärkster Tag), in the library plugin's own words, and a range with nothing in it shows none. The total stays under the chart. The Usage page's charts have the same bare peak (plugins/usage/page.js 875 and 4315); filed as #6517, not changed here. Tests: - internal/library/testdata/rtk-gain-daily.json is real rtk 1.0.1 `rtk gain --daily --format json` output from a sandbox HOME; TestRTKGainRealDaily parses it and checks the days add up to the summary. - library-rtk-chart.test.cjs feeds those days (moved to end yesterday) through a faked /api/library/rtk, chromium and webkit, en/zh/zh-TW/ja/de at 980 and 420px: the head says the peak, the busiest bar is the one at full height, the foot is the total; an empty 30-day range has no peak. Run on mica (base5b25d7e9e, then again after the rebase onto49d7adef7: gofmt, the provider and library tests, library-rtk-chart, library-rtk-gain, i18n-keys, i18n-en-no-cjk all pass): gofmt -l clean; go test ./internal/library ok; GOOS=darwin/windows go vet and GOOS=linux go vet -tags nogui of internal/{provider,library,gui} ok; GUI files library-rtk-chart, library-rtk-gain, library-rtk-admin, library-rtk-nohook, i18n-keys, i18n-en-no-cjk all pass (both engines). Broken by hand: the old head (bare tokens(peak)) makes all 12 library-rtk-chart subtests red. Also run: go test -tags nogui ./internal/gui ./internal/provider: red only on TestCoreScriptBudget (1,268,751 > 1,268,645, the same number #6518 records at base 5b25d7e9e; this change adds no core script) and TestHostBuildsNoList (#6479); editor-hints webkit red as in #6156. Not run: the full Go suite and the whole GUI suite.
75 lines
1.6 KiB
JSON
75 lines
1.6 KiB
JSON
{
|
|
"summary": {
|
|
"total_commands": 632,
|
|
"total_input": 3160000,
|
|
"total_output": 2295000,
|
|
"total_saved": 865000,
|
|
"avg_savings_pct": 27.37341772151899,
|
|
"total_time_ms": 6320,
|
|
"avg_time_ms": 10,
|
|
"oversized_excluded": 0
|
|
},
|
|
"daily": [
|
|
{
|
|
"date": "2026-10-23",
|
|
"commands": 79,
|
|
"input_tokens": 395000,
|
|
"output_tokens": 276500,
|
|
"saved_tokens": 118500,
|
|
"savings_pct": 30.0,
|
|
"total_time_ms": 790,
|
|
"avg_time_ms": 10
|
|
},
|
|
{
|
|
"date": "2026-10-24",
|
|
"commands": 241,
|
|
"input_tokens": 1205000,
|
|
"output_tokens": 843500,
|
|
"saved_tokens": 361500,
|
|
"savings_pct": 30.0,
|
|
"total_time_ms": 2410,
|
|
"avg_time_ms": 10
|
|
},
|
|
{
|
|
"date": "2026-11-01",
|
|
"commands": 60,
|
|
"input_tokens": 300000,
|
|
"output_tokens": 210000,
|
|
"saved_tokens": 90000,
|
|
"savings_pct": 30.0,
|
|
"total_time_ms": 600,
|
|
"avg_time_ms": 10
|
|
},
|
|
{
|
|
"date": "2026-11-05",
|
|
"commands": 160,
|
|
"input_tokens": 800000,
|
|
"output_tokens": 600000,
|
|
"saved_tokens": 200000,
|
|
"savings_pct": 25.0,
|
|
"total_time_ms": 1600,
|
|
"avg_time_ms": 10
|
|
},
|
|
{
|
|
"date": "2026-11-10",
|
|
"commands": 80,
|
|
"input_tokens": 400000,
|
|
"output_tokens": 320000,
|
|
"saved_tokens": 80000,
|
|
"savings_pct": 20.0,
|
|
"total_time_ms": 800,
|
|
"avg_time_ms": 10
|
|
},
|
|
{
|
|
"date": "2026-11-12",
|
|
"commands": 12,
|
|
"input_tokens": 60000,
|
|
"output_tokens": 45000,
|
|
"saved_tokens": 15000,
|
|
"savings_pct": 25.0,
|
|
"total_time_ms": 120,
|
|
"avg_time_ms": 10
|
|
}
|
|
]
|
|
}
|