I have created a websocket server using ratchet, and would like to monitor my servers CPU/Ram usage as the number of concurrent connections goes up. I've tried to do this in the dev console with a loop like so
var connections = new Array();
for(i = 0; i < 1000; i++){
connections[i] = new WebSocket('ws://www.foo.bar:8080');
connections[i].onopen = function(){
connections[i].send('Connection #' + i +' here!');
}
}
I've seen people load test WebSocket servers with a simple javascript script I just can't seem to figure out how they did it. Can anyone point me to such a script?