pi-tps-meter
v3.0.1
Published
Tokens per second meter for pi CLI — live TPS, rolling avg, mean, p95
Maintainers
Readme
pi-tps-meter
Tokens per second meter for pi CLI with sparkline trend visualization.
Install
pi install npm:pi-tps-meterDisplay
Streaming — live sparkline updates every 200ms:
⠹ ▁▂▃▅▇▆▅▃▂▁ 42 tpsComplete — aggregate stats with trend:
TPS ▁▂▃▅▇▆▅▃▂▁ 42 avg | μ 39 | p95 61Sparkline uses Unicode block characters ▁▂▃▄▅▆▇█ — each char = one recent message's TPS. Left = oldest, right = newest. Color-coded by speed.
Colors:
- 🟢 Green: >50 tps (fast)
- 🟡 Yellow: 20-50 tps (medium)
- 🔴 Red: <20 tps (slow)
Optimizations
- Fixed ring buffers (zero allocations)
- Bitwise token estimation
- Single shared timer
- Insertion sort for p95
Author
Venkata Sai Chirasani
License
MIT
