Closed hequanb closed 6 years ago
Seems like I make some stupid wrong, to test our own project (socket.io), we have to add our own namespace to the server url, like http:server.cn/namespace1
, and to send message, we need to add argument '-m -v
.
And my full command is
websocket-bench -a 1000 -c 250 -g generator.js -m 2 -k http://test:3000/namespace -v
how to test my project
I'm a noob.. I user websocket-bench to test my project with command
websocket-bench -a 10000 -c 1000 -g ../lib/generator.js -k http://***.cn
and sometimes i got some tables named '#### steps report ####' , is it the final log of this test?usage of 'onConnect' and 'sendMessage'
my generator.js
onConnect : function (client, done) { client.emit('sign', {uid: 'bench_1' , nickName: 'nickName:2'}); done(); }, sendMessage : function (client, done) { logger.error('Not implement method sendMessage in generator'); client.emit('message', {text: 'text: 1' , nickName: 'nickName:'+ 2}); done(); }
and why my project got no message on console?please help..