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

@lxgicstudios/api-bench

v1.0.0

Published

Benchmark API endpoint performance with concurrency control. Measures latency percentiles, RPS, and error rates. CLI load testing tool.

Readme

api-bench

npm version License: MIT

Benchmark your API endpoints right from the terminal. Sends N requests with C concurrency and gives you the numbers that matter: min/max/avg latency, p95, p99, RPS, and error rates.

Install

npm install -g @lxgicstudios/api-bench

Or run directly:

npx @lxgicstudios/api-bench https://api.example.com/health

Features

  • Concurrency control - Set exactly how many parallel requests you want
  • Latency percentiles - Get p50, p95, and p99 numbers
  • RPS calculation - Requests per second throughput
  • Error tracking - Status codes and error rate breakdown
  • Compare mode - Benchmark two URLs side by side
  • Ramp-up mode - Gradually increase concurrency to find breaking points
  • POST support - Send custom bodies and headers
  • JSON output - Pipe results to other tools
  • Zero dependencies - Built with Node.js builtins only
  • Progress bar - See what's happening in real-time

Usage

# Basic benchmark (100 requests, 10 concurrent)
api-bench https://api.example.com/health

# Heavy load test
api-bench https://api.example.com -n 1000 -c 100

# POST with JSON body
api-bench https://api.example.com/data -m POST \
  -b '{"name":"test"}' \
  -H 'Content-Type: application/json'

# Compare two endpoints
api-bench https://api-v1.example.com/users \
  --compare https://api-v2.example.com/users

# Ramp up concurrency gradually
api-bench https://api.example.com -n 500 -c 100 --ramp

# JSON output for CI/CD
api-bench https://api.example.com --json

Options

| Option | Description | Default | |--------|-------------|---------| | -n, --requests <num> | Total number of requests | 100 | | -c, --concurrency <num> | Concurrent requests | 10 | | -m, --method <method> | HTTP method | GET | | -H, --header <header> | Add header (repeatable) | - | | -b, --body <data> | Request body | - | | -t, --timeout <ms> | Request timeout | 10000 | | --compare <url> | Compare against second URL | - | | --ramp | Gradually increase concurrency | false | | --ramp-steps <num> | Number of ramp steps | 5 | | --json | Output results as JSON | false | | --help | Show help | - |

Output Example

 BENCHMARK RESULTS

  URL:          https://api.example.com/health
  Method:       GET
  Requests:     100
  Concurrency:  10
  Total Time:   2.34s

  Latency
  ────────────────────────────────────────
  Min:          12.3ms
  Max:          89.7ms
  Avg:          23.4ms
  Median:       21.1ms
  p95:          45.2ms
  p99:          78.3ms

  Throughput
  ────────────────────────────────────────
  RPS:          42.7 req/s
  Data:         125.4KB

Built by LXGIC Studios

GitHub | Twitter