BedrockStreaming / websocket-bench

⛔️ DEPRECATED - nodejs tool to benchmark socket.io and faye websocket server
675 stars 186 forks source link

Using as node module export #26

Open iamchrismiller opened 10 years ago

iamchrismiller commented 10 years ago

I would like to use this project as a node module so I can have more control but that would change the existing implementation a bit.

I propose that a new library is created websocket-benchmarker which will contain the main logic and export all the "core" libraries.

This module can depend on the websocket-benchmarker module (to be created) and the commander script will reference the exported module.

I already have this working in a branch export-app but would need to separate the core library out to another repository, so it can still be used as a cli tool.

Check it out here: https://github.com/iamchrismiller/websocket-bench/tree/export-app

This required me to clean up the process variable leaking into a few places it doesn't need to be and is now passed in to the constructors.

I will write some tests expecting the module is exporting all the required libs correctly and a bit more cleanup this weekend.

Let me know what you think.

nchaulet commented 10 years ago

I thinks is really a good idea :+1: