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 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-ab

v0.0.6

Published

A command tool to test the performance of HTTP services.

Downloads

11

Readme

Node ab testing

Automatically benchmarking the performance of HTTP services.

node-ab

How it works

Ab testing tool to check the performance of an HTTP service. 100 more GET request will be increased per second. It will not increase more request if there are more than 10 request not returned. It will stop when there are less than 99% request return successful.

The requests number per increase round and the time of each round can be changed by user.

Installation:

sudo npm install node-ab -g 

Usage:

nab [URL] [--increase 100] [--milliseconds 1] [--help] [--verbose]


nab --help
Usage: nab <URL> [--increase 100] [--milliseconds 1] [--help] [--verbose]

Samples:
    nab http://192.168.1.66
    nab http://localhost
    nab http://localhost:4000 --increase 200
    nab http://localhost:4000 -i 200
    nab http://localhost:4000 --milliseconds 1500
    nab http://localhost:4000 --milliseconds 1500 --verbose
    nab http://localhost:4000 -m 1500
    nab http://localhost:4000 -m 1500 -v
    nab --help
    nab -h

Example:

nab http://localhost:4000/test
Request number: 200 Return number: 200 QPS: 66 Traffic: 32KB per second
Request number: 800 Return number: 800 QPS: 133 Traffic: 65KB per second
Request number: 1700 Return number: 1700 QPS: 188 Traffic: 92KB per second
Request number: 2900 Return number: 2900 QPS: 241 Traffic: 117KB per second
Request number: 4400 Return number: 4400 QPS: 293 Traffic: 143KB per second
Request number: 6200 Return number: 6200 QPS: 344 Traffic: 168KB per second
Request number: 8300 Return number: 8300 QPS: 394 Traffic: 192KB per second
Request number: 10700 Return number: 10700 QPS: 445 Traffic: 217KB per second
Request number: 13400 Return number: 13400 QPS: 495 Traffic: 242KB per second
Request number: 16400 Return number: 16366 QPS: 545 Traffic: 266KB per second
Request number: 16400 Return number: 16366 QPS: 495 Traffic: 241KB per second
Request number: 16400 Return number: 16366 QPS: 454 Traffic: 221KB per second
Request number: 16400 Return number: 16366 QPS: 419 Traffic: 204KB per second
Request number: 16400 Return number: 16366 QPS: 389 Traffic: 190KB per second
Request number: 18400 Return number: 18268 QPS: 405 Traffic: 198KB per second
Request number: 21400 Return number: 21009 QPS: 437 Traffic: 213KB per second

Development

git clone [email protected]:doubaokun/node-ab.git
npm install -d

Start a sample http service at http://127.0.0.1:4000/test

node sample/app.js

Start testing the sample http service

./bin/nab http://localhost:81/test