@sugarforever/pi-throughput-meter
v0.1.1
Published
Per-turn TTFT and output token throughput for Pi
Maintainers
Readme
pi-throughput-meter
pi-throughput-meter is a small Pi extension that displays per-turn latency and output throughput in Pi's TUI status area.
After each assistant turn it shows:
TTFT 312 ms · ↓428 · 186.4 tok/s- TTFT: milliseconds from Pi's
turn_startevent to the first streamed message update. - ↓ tokens: output tokens reported by the provider for the completed assistant message.
- tok/s: output tokens divided by the time from the first streamed update to
turn_end.
These are client-observed measurements, so network latency, provider chunking, and Pi event timing affect the result. The extension does not report input tokens per second because input/prefill is not exposed as a token stream; TTFT is the useful observable proxy for that phase.
Install
After the package is published:
pi install npm:@sugarforever/pi-throughput-meterFor local development from this repository:
pi -e ./pi-throughput-meterYou can also load the built entry point explicitly:
npm --prefix pi-throughput-meter run build
pi --extension ./pi-throughput-meter/dist/index.jsDevelopment
cd pi-throughput-meter
npm install
npm run checkLicense
MIT
