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-perf

v1.0.0

Published

Pi-native performance benchmarking toolkit for pi.dev extensions — profiling, benchmarking, and CI reporting

Readme

pi-perf

Pi-native performance benchmarking toolkit for pi.dev extensions — profiling, benchmarking, and CI reporting.

Installation

pi install npm:pi-perf

What It Does

pi-perf provides deterministic performance measurement tools for pi.dev extensions. No LLM calls — all measurements are pure timing, memory, and CPU instrumentation.

Three tools:

  • perf_profile — Run a tool N times, collect timing/memory/CPU stats, detect outliers via IQR
  • perf_bench — Run a benchmark suite (JSON-defined test cases), compare against baselines for regression detection
  • perf_report — Generate CI-friendly reports (JSON/Markdown/HTML) with configurable pass/fail thresholds

Tools

perf_profile

Profile the execution of a pi.dev extension tool.

Parameters:

  • toolName (string, required) — Name of the tool to profile
  • args (object, optional) — Arguments to pass to the tool
  • iterations (number, optional, default: 10) — Number of measured iterations (1-1000)
  • warmup (boolean, optional, default: true) — Run 3 warmup iterations before measuring

Example:

Use the perf_profile tool with toolName="my_tool", iterations=20, warmup=true

Returns: Duration stats (avg, min, max, P50/P95/P99), memory delta, CPU usage, outlier list.

perf_bench

Run a benchmark suite against pi.dev extensions.

Parameters:

  • suitePath (string, optional) — Path to a benchmark suite JSON file (default: discovers in ./perf-suites/)
  • compare (string, optional) — Path to a baseline result JSON for comparison
  • output (string, optional, default: "markdown") — Output format: json, markdown, or table

Example:

Use the perf_bench tool with suitePath="./perf-suites/ci.json", compare="./baselines/v1.json"

Suite JSON format:

{
  "name": "my-suite",
  "description": "Regression tests",
  "cases": [
    { "name": "fast-tool", "toolName": "tool_a", "iterations": 10 },
    { "name": "slow-tool", "toolName": "tool_b", "iterations": 5, "warmup": false }
  ]
}

Comparison thresholds:

  • Regressions: >15% slower → FAIL
  • Warnings: >5% slower → WARN
  • Improvements: >10% faster → noted

perf_report

Generate a performance report with CI-friendly output.

Parameters:

  • format (string, required) — Output format: json, markdown, or html
  • outputPath (string, optional) — Write report to file (default: return inline)
  • thresholds (object, optional) — Pass/fail thresholds as metric:value pairs

Available threshold metrics:

  • avg_duration_ms — Average execution time
  • p95_duration_ms — 95th percentile latency
  • p99_duration_ms — 99th percentile latency
  • memory_delta_mb — Memory usage change
  • outliers_count — Number of statistical outliers

Example:

Use the perf_report tool with format="markdown", thresholds={"avg_duration_ms": 50, "p95_duration_ms": 100}

CI Integration

Use with pi-ci to add performance gates to your CI pipeline:

- name: Performance check
  run: |
    pi --provider xiaomi --model mimo-v2.5-pro --api-key "$API_KEY" \
      -e . -p "Run perf_bench with suitePath='./perf-suites/ci.json' then perf_report with format='json' and thresholds={\"avg_duration_ms\":50}" \
      --no-session

Resources

License

MIT