pi-tps-meter

Tokens per second meter for pi CLI — live TPS, rolling avg, mean, p95

Packages

Package details

extension

Install pi-tps-meter from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-tps-meter
Package
pi-tps-meter
Version
3.0.1
Published
May 31, 2026
Downloads
not available
Author
venkyyy27
License
MIT
Types
extension
Size
10 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-tps-meter

Tokens per second meter for pi CLI with sparkline trend visualization.

Install

pi install npm:pi-tps-meter

Display

Streaming — live sparkline updates every 200ms:

⠹ ▁▂▃▅▇▆▅▃▂▁ 42 tps

Complete — aggregate stats with trend:

TPS ▁▂▃▅▇▆▅▃▂▁ 42 avg | μ 39 | p95 61

Sparkline 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