Last active
December 20, 2015 16:59
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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