mirror of
https://git.sync.wtf/troed/oc-ls-stats.git
synced 2026-08-31 09:43:38 +03:00
36fcaa27a13602f38d9bf93c895dd3d1a3f93a83
- Fix PP calculation: use per-slot n_prompt_tokens during prefill state instead of global llamacpp:prompt_tokens_total from /metrics - Add isPrefilling flag and prefill tracking state (slotId, capturedTokens, startAt) - Add dedicated formatters: formatPps, formatTps, formatAvg, pad4 - Replace formatRate suffixes with raw number formatters - Display: PP | TPS | AVG with fixed-width 4-char padding - Slot polling every 2s with model query parameter - Debug logging to /tmp/oc-ls-stats-debug.log - Add .npmignore, TUIPLUGIN.md, test-debug-log.jsonl - Update AGENTS.md with slot state phases, PP calculation docs
oc-tps
Displays live TPS (tokens per second), average TPS, and average TTFT (time to first token) in the OpenCode session prompt.
Installation
Install from the CLI:
opencode plugin oc-tps@latest --global
Requires opencode 1.3.14 or newer.
Languages
TypeScript
100%
