
Product
Introducing Historical Analytics – Now in Beta
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.
websocket-bench-sockjs
Advanced tools
Tool for benchmark websocket (socket.io, faye, primus, sockjs)
Nodejs cli tool for benchmarking websocket servers. It supports sockjs.
npm install -g websocket-bench-sockjs
First Install required dev-dependencies npm install
Run Gulp Build Tool gulp mocha
Tip: You may find it useful to increase the maximum number of open file descriptors on your system during testing:
ulimit -n 60000
Simple example:
websocket-bench-sockjs -a 20000 -c 2000 --ramp=200 -g ./src/resources/scenarios/auth-0001.js http://localhost:8000/realtime
command help
Usage: websocket-bench-sockjs [options] <server>
Options:
-h, --help Output usage information
-V, --version Output the version number
-a, --amount <n> Total number of persistent connection, Default to 100
-w, --worker-ramp <n> Worker ramp in ms, Default to 5
-r, --request-ramp <n> Request ramp in ms, Default to 5
-W, --worker <n> Number of worker(s)
-g, --generator <file> Js file for generate message or special event
-o, --output <output> Output file
-v, --verbose Verbose Logging
For benchmark message or more advanced connection you should provide your own generator
generator structure :
module.exports = {
/**
* Before connection (optional, just for faye)
* @param {client} client connection
*/
beforeConnect : function(client) {
// Do something
},
/**
* On client connection (required)
* @param {client} client connection
* @param {done} callback function(err) {}
*/
onConnect : function(client, done) {
// client.send('Sailing the seas of cheese');
done();
},
};
FAQs
Tool for benchmark websocket (socket.io, faye, primus, sockjs)
The npm package websocket-bench-sockjs receives a total of 10 weekly downloads. As such, websocket-bench-sockjs popularity was classified as not popular.
We found that websocket-bench-sockjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Company News
Socket is bringing best-in-class reachability analysis into the platform — cutting false positives, accelerating triage, and cementing our place as the leader in software supply chain security.