From ce0444420e037078b46cc5e0950a8a3fbd747570 Mon Sep 17 00:00:00 2001 From: Chris O'Hara Date: Wed, 9 Mar 2011 19:39:55 +1100 Subject: [PATCH] Added the -m, --max op for setting max concurrent requests at the command line --- lib/node.io/interfaces/cli.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/node.io/interfaces/cli.js b/lib/node.io/interfaces/cli.js index 77d2a65..6a133fd 100755 --- a/lib/node.io/interfaces/cli.js +++ b/lib/node.io/interfaces/cli.js @@ -25,6 +25,7 @@ var usage = '' + ' -u, --unpack Unpack a job using the specified password\n' + ' -d, --daemon Daemonize the process (requires daemon.node)\n' + ' --spoof Spoof request headers\n' + + ' -m, --max Set the maximum concurrent requests\n' + ' -b, --benchmark Benchmark the operation\n' + ' -g, --debug Debug the operation\n' + ' -v, --version Display the current version\n' @@ -40,7 +41,6 @@ var usage = '' * @api public */ exports.cli = function (args, exit) { - exit = exit || function (msg, is_error) { utils.status[is_error ? 'error' : 'info'](msg); process.exit(1); @@ -83,6 +83,9 @@ exports.cli = function (args, exit) { case '--spoof': options.spoof = true; break; + case '-m': + case '--max': + options.max = args.shift(); case '-t': case '--timeout': options.global_timeout = args.shift();