Registry / testing / websocket-bench

websocket-bench

JSON →
library0.2.0jsnpmunverified

CLI tool for benchmarking WebSocket servers (Socket.IO, Engine.IO, Faye, Primus, WAMP). Version 0.2.0 appears to be the latest. It allows simulating many concurrent persistent connections, with customizable message generators. Offsets the complexity of writing custom benchmark scripts. Last updated years ago with no recent activity; use at your own risk.

npm install websocket-bench
INSTALL
IMPORT
SIG · WEBSOCKET-BENCH
W
websocket-bench
testingjavascriptv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

(CLI usage)
npx websocket-bench -a 2500 -c 200 http://localhost:3000
require('websocket-bench')
websocket-bench is a CLI tool, not a library. Do not import programmatically; run via command line.

Run a benchmark with 2500 total connections, 200 concurrent connections per second against a Socket.IO server.

ulimit -n 60000 npx websocket-bench -a 2500 -c 200 http://localhost:3000
Debug
Known issues
gotchaLimit of open file descriptors: benchmarks with many connections may fail due to OS limits.
fix
Run 'ulimit -n 60000' before starting the benchmark to increase the limit.
affects: *
deprecatedPackage has not been updated for several years; may not work with modern Node.js versions.
fix
Consider using alternative tools like 'autocannon' or 'wrk' for WebSocket benchmarking, or fork and update the package.
affects: <=0.2.0
gotchaGenerator files must export specific functions (beforeConnect, onConnect, sendMessage, options) exactly as documented.
fix
Ensure your generator module exports the required functions. See README for structure.
affects: *
Errors
Common errors & fixes
Error: listen EADDRINUSE :::<port>
Multiple instances trying to use the same port or workers conflict.
fix
Use a different port, close other processes, or adjust worker count.
Error: Cannot find module 'engine.io'
Missing optional dependency for engine.io transport.
fix
Install the dependency: npm install engine.io
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
Amazon
1
Resources
websocket-bench — npm install websocket-bench · libregistry