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

@lowdep/api-bench

v1.0.0

Published

Lightweight HTTP load benchmark — RPS, p50/p95/p99 latencies, status code breakdown, zero dependencies

Readme

api-bench

Zero dependencies Node License: MIT Platform

Lightweight HTTP load benchmark CLI. RPS, p50/p90/p95/p99 latencies, status code breakdown. Zero dependencies.

Unlike wrk (C binary, Unix), ab (Apache Bench, system install), or autocannon (npm + deps), api-bench runs anywhere Node.js does.


Install

npm install -g api-bench

Or without installing:

npx api-bench http://localhost:3000/

Usage

api-bench http://localhost:3000/                     # 10 conn, 10s
api-bench https://api.example.com/health -c 50 -d 30 # 50 conn, 30s
api-bench http://localhost/auth -X POST \
          -H "Content-Type: application/json" \
          -b '{"user":"alice","pwd":"abc"}'
api-bench http://localhost/api -b @payload.json      # body from file
api-bench http://localhost/api --json                # JSON output

Example Output

api-bench  GET http://localhost:3000/users
  50 conn  ·  30s  ·  warmup 10 req

Results

  Requests          142,318  in 30.02s
  Requests/sec      4,741
  Throughput        2.84 MB/s
  Errors            0  (0.0%)

Latency

  min     1.2ms
  avg     10.5ms
  p50     8.1ms
  p90     14.2ms
  p95     22.4ms
  p99     48.7ms
  max     245ms

Status Codes

  200          141,892  (99.7%)
  404          426      (0.3%)

Why p99 Matters

avg lies. If most requests are fast but 1% are slow, the average looks fine — but your slowest 1% of users have a terrible experience. p95/p99 surface the worst real cases.

api-bench always shows the full latency distribution so you can spot tail-latency issues.


Options

| Flag | Default | Description | |---|---|---| | -c, --concurrency | 10 | Parallel connections | | -d, --duration | 10 | Duration in seconds | | -X, --method | GET | HTTP method | | -H, --header | — | Add header (repeatable) | | -b, --body | — | Body string, or @file | | --warmup | 10 | Warmup requests before measuring | | --timeout | 30000 | Per-request timeout (ms) | | --json | off | JSON output |


License

MIT


Keywords

load testing · http benchmark · wrk alternative · ab alternative · autocannon alternative · requests per second · p99 latency · stress test · zero dependencies · cli


Built to solve, shared to help — Rushabh Shah 🛠️✨

One of 40+ zero-dependency developer CLI tools — no node_modules, ever.