Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

wsbench doesn't work #6

Open
hvnguyen86 opened this issue Apr 11, 2012 · 4 comments
Open

wsbench doesn't work #6

hvnguyen86 opened this issue Apr 11, 2012 · 4 comments

Comments

@hvnguyen86
Copy link

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
Copy link

denen99 commented Jul 17, 2012

same here. OSX 10.6

@alexey-shaposhnikov
Copy link

same here. OSX 10.7.4 nodejs v0.8.14

@tahir-gvs
Copy link

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants