Severity: LOW
File: plugins/tps/meter.js:8-13
/**
* RateMeter — trailing-window rate estimator.
*
* Designed to answer "how fast are tokens arriving right now?" from a
* time-series of (tokens, timestamp) deltas. This is the estimator used for
* the headline "live TPS" number displayed in the sidebar.
*/
What is wrong
ARCHITECTURE.md (lines 89-93) explicitly states:
meter.js: Trailing-window sparkline only. ... The headline TPS in the sidebar comes from gen.js's GenerationTimer, not from RateMeter.
The actual code in tps-meter.tsx (~line 244) confirms this: the live headline comes from GenerationTimer.tps(), not RateMeter.rate(). RateMeter.rate() is used exclusively for RateMeter.sample() -> series() -> sparkline rendering.
This comment misleads anyone reading the code about which component is authoritative for the headline number.
Suggested fix
/**
* RateMeter — trailing-window rate estimator.
*
* Designed to answer "how fast are tokens arriving right now?" from a
* time-series of (tokens, timestamp) deltas. Used for the sparkline
* (visual texture) and the optional "now" detail line. The authoritative
* headline TPS in the sidebar comes from GenerationTimer, not from
* RateMeter.
*/
Severity: LOW
File:
plugins/tps/meter.js:8-13What is wrong
ARCHITECTURE.md (lines 89-93) explicitly states:
The actual code in
tps-meter.tsx(~line 244) confirms this: the live headline comes fromGenerationTimer.tps(), notRateMeter.rate().RateMeter.rate()is used exclusively forRateMeter.sample()->series()-> sparkline rendering.This comment misleads anyone reading the code about which component is authoritative for the headline number.
Suggested fix