npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-metrics

v0.2.3

Published

Pi metrics extension: elapsed-time HUD and resilient TPS telemetry

Readme

pi-metrics

面向 Pi coding agent 的会话指标扩展:working spinner 实时计时,并提供每轮 TPS、TTFT 和 token 使用量。

English

功能

  • 工作期间 spinner 显示从发出消息起的全程耗时(如 ⏱ 47s),跨轮次持续累加,不再每轮回零。
  • 每个轮次结束时插入一条灰色文本,显示该轮精确耗时(⏱ 本轮耗时 8.2s)。
  • AI 完全停止时(agent_settled,覆盖自动重试、compaction 续跑以及 Esc 中断)追加一行从发出消息到停止的总耗时⏱ 总耗时 18.9s)。
  • 每轮 LLM 调用结束后显示 TPS、TTFT、token 数、生成耗时、stall 和可用的综合成本。
  • Telemetry 以 tps custom session entry 持久化,并在恢复 session 或 /tree 后恢复显示。
  • Metrics 通过 session entry 和通知提供;本包不再注册导出类斜杠命令。

从 pi-tps 迁移

TPS 实现现在由本包维护。启用本包前,请从 Pi 配置中移除独立的 npm:@monotykamary/pi-tps,否则两个扩展会重复写入 tps 条目并重复通知。

安装

pi install npm:pi-metrics

实现说明

  • 总耗时以 input 事件(用户提交消息的时刻)为起点、agent_settled 为终点,因此多轮工具调用、自动重试和队列续跑都计入同一次总耗时;运行中发送的 steer/followUp 消息不会重置起点。
  • 非 TUI 模式(rpc/print)下不启动定时器、不发送通知。
  • Neuralwatt 成本监听器会在 session_shutdown 时取消订阅,恢复通知的延迟定时器也会在 reload/session 切换时清理。

国际化

所有面向用户的文案均通过 pi-extensions-i18n 提供 zh-CNen-US 双语。