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

Update for 0.6.x #4

Open
geuis opened this issue Dec 8, 2011 · 3 comments
Open

Update for 0.6.x #4

geuis opened this issue Dec 8, 2011 · 3 comments

Comments

@geuis
Copy link

geuis commented Dec 8, 2011

Any eta on when wsbench will be updated to work with node 0.6.x?

@Jimflip
Copy link

Jimflip commented Jan 11, 2012

running on [email protected] I get the following

node wsbench -r 10 ws://localhost:3010
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 (/wsbench/lib/optparse.js:144:23)
at build_rules (/wsbench/lib/optparse.js:77:13)
at Object.parse (/wsbench/lib/optparse.js:224:21)
at Object. (/wsbench/wsbench:113:4)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array.0 (module.js:470:10)

@23doors
Copy link

23doors commented Jan 16, 2012

Made a quick fix. Actually, it is not wsbench that is at fault, but optparse.js library.

https://gist.github.com/1619157

Here you can get patch to apply.

What I did? Updated lib/optparse.js to 1.0.3 (https://raw.github.com/jfd/optparse-js/master/lib/optparse.js)
Edited wsbench and lib/websocket.js and changed line "var sys = require('sys');" to "var sys = require('util');" to get rid of the warning.

Yeah, it should be refactored in a better way but who cares.

@SeanBannister
Copy link

I've forked the code and fixed it and issued a pull request #5

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