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

ws-benchmark

v1.4.2

Published

A CLI tool for websocket, like apache bench for http.

Downloads

21

Readme

ws-benchmark

Dependency Status devDependency Status Build Status: Windows Github CI Github CI npm version Downloads type-coverage

A CLI tool for websocket, like apache bench for http.

install

yarn global add ws-benchmark

usage

run ws-benchmark "ws://localhost:8080" -c 10 -n 2000

supported protocols

  • ws: ws-benchmark "ws://localhost:8080" -c 10 -n 2000
  • wss: ws-benchmark "wss://localhost:8080" -c 10 -n 2000
  • http: ws-benchmark "http://localhost:8080" -c 10 -n 2000
  • https: ws-benchmark "https://localhost:8080" -c 10 -n 2000
  • socket.io: ws-benchmark "ws://localhost:8080/socket.io/?transport=websocket" -c 10 -n 2000

optional parameters

name | default | description --- | --- | --- -c | -c 1 | Number of multiple requests to make at a time(the count of http clients or websocket connections) -n | -n 1 | Number of requests to perform -m | -m GET | Method name -s | -s 30 | Seconds to max. wait for each response -f | | File containing data to request. Remember also to set -T -T | -T 'text/plain' | Content-type header to use -C | | Add cookie, eg. 'Apache=1234' -H | | Add Arbitrary header line, eg. 'Accept-Encoding: gzip' -k | | Use HTTP KeepAlive feature -h,--help | | Print this message. -v,--version | | Print the version

result example

Completed 200 requests
Completed 400 requests
Completed 600 requests
Completed 800 requests
Completed 1000 requests
Completed 1200 requests
Completed 1400 requests
Completed 1600 requests
Completed 1800 requests
Completed 2000 requests
Concurrency Level:      10
Time taken for tests:   0.196 seconds
Complete requests:      2000
Failed requests:        0
Requests per second:    10182.00 [#/sec] (mean)
Time per request:       0.982 [ms] (mean)
Time per request:       0.098 [ms] (mean, across all concurrent requests)
Average time:           0.069 [ms]
Min time:               0.032 [ms]
Max time:               1.612 [ms]

Percentage of the requests served within a certain time (ms)
  50%      0.060
  66%      0.068
  75%      0.077
  80%      0.081
  90%      0.093
  95%      0.102
  98%      0.110
  99%      0.129
 100%      1.612