Skip to content

Instantly share code, notes, and snippets.

@5v3n
Last active December 20, 2015 16:59
Show Gist options
  • Save 5v3n/6165199 to your computer and use it in GitHub Desktop.
Save 5v3n/6165199 to your computer and use it in GitHub Desktop.
load test faye server. connect 200 concurrent clients that subscribe to a channel.
var faye = require('faye');
var clients = [], client;
var responseCount = 0;
for (var i = 0; i < 200; i++) {
client = new faye.Client('http://HOSTNAME/faye');
client.subscribe('/status/realtime', function(message) {
var time = new Date().getTime();
responseCount++;
console.log(responseCount);
});
clients.push(client);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment