pgriess / wsbench

A benchmarking tool for Web Socket servers
BSD 3-Clause "New" or "Revised" License
168 stars 29 forks source link

wsbench doesn't work #6

Open hvnguyen86 opened 12 years ago

hvnguyen86 commented 12 years ago

Hello,

i get the following issue when i start wsbench:

./wsbench ws://139.6.253.54 The "sys" module is now called "util". It should have a similar interface.

node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: object is not a function at RegExp.CALL_NON_FUNCTION (native) at contains_expr (/Library/WebServer/Documents/bachelorarbeit/wsbench/lib/optparse.js:144:23) at build_rules (/Library/WebServer/Documents/bachelorarbeit/wsbench/lib/optparse.js:77:13) at Object.parse (/Library/WebServer/Documents/bachelorarbeit/wsbench/lib/optparse.js:224:21) at Object. (/Library/WebServer/Documents/bachelorarbeit/wsbench/wsbench:113:4) at Module._compile (module.js:444:26) at Object..js (module.js:462:10) at Module.load (module.js:351:31) at Function._load (module.js:310:12) at Array.0 (module.js:482:10)

Can somebody help me?

Greetz, Viet

denen99 commented 12 years ago

same here. OSX 10.6

alexey-shaposhnikov commented 11 years ago

same here. OSX 10.7.4 nodejs v0.8.14

tahir-gvs commented 11 years ago

OSX 10.7.5 nodejs v0.8.9

I am getting a different error:

/Users/developer/tools/wsbench/lib/optparse.js:144 while(l-- > 0) if(LONG_SWITCH_RE(arr[l])) return true; ^ TypeError: object is not a function at contains_expr (/Users/developer/tools/wsbench/lib/optparse.js:144:23) at build_rules (/Users/developer/tools/wsbench/lib/optparse.js:77:13) at Object.OptionParser.parse (/Users/developer/tools/wsbench/lib/optparse.js:224:21) at Object. (/Users/developer/tools/wsbench/wsbench:113:4) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.runMain (module.js:492:10) at process.startup.processNextTick.process._tickCallback (node.js:244:9)

tahir-gvs commented 11 years ago

I was able to get it to work by my modifying the optparse.js

Replace all regular expression calls with call to exec on RE object, like:

LONG_SWITCH_RE(r[0]) ? 0 : 1

LONG_SWITCH_RE.exec(r[0]) ? 0 : 1