Comparing version 0.2.1 to 0.2.2
@@ -0,13 +1,23 @@ | ||
#!/usr/bin/env node | ||
/** | ||
* Binary to run loadtest. | ||
* (C) 2013 Manuel Ernst, Alex Fernández. | ||
*/ | ||
// requires | ||
var args = require('optimist').argv; | ||
var fs = require('fs'); | ||
var loadTest = require('../lib/loadtest.js'); | ||
var loadTest = require('../lib/loadTest'); | ||
// globals | ||
var options = {}; | ||
//is there an url? if not, break and display help | ||
if(args._.length == 0) help(); | ||
// init | ||
// is there an url? if not, break and display help | ||
if(args._.length == 0) | ||
{ | ||
help(); | ||
} | ||
options.url = args._[0]; | ||
assignArgument('n', args, 'maxRequests', options); | ||
@@ -23,5 +33,3 @@ assignArgument('c', args, 'concurrency', options); | ||
assignArgument('debug', args, 'debug', options, true); | ||
//TODO: add index Param | ||
if(args.p) | ||
@@ -32,3 +40,2 @@ { | ||
} | ||
if(args.u) | ||
@@ -39,3 +46,2 @@ { | ||
} | ||
if(args.rps) | ||
@@ -45,3 +51,2 @@ { | ||
} | ||
loadTest.loadTest(options); | ||
@@ -57,2 +62,5 @@ | ||
/** | ||
* Show online help. | ||
*/ | ||
function help() | ||
@@ -80,4 +88,3 @@ { | ||
console.log(' --debug Show debug messages'); | ||
process.exit(0); | ||
} | ||
} |
@@ -1,9 +0,20 @@ | ||
var testServer = require('../lib/testserver'); | ||
#!/usr/bin/env node | ||
/** | ||
* Binary to run test server. | ||
* (C) 2013 Manuel Ernst, Alex Fernández. | ||
*/ | ||
// requires | ||
var args = require('optimist').argv; | ||
var testServer = require('../lib/testserver'); | ||
if(args.help || args.h) help(); | ||
// globals | ||
var options = {}; | ||
// init | ||
if(args.help || args.h) | ||
{ | ||
help(); | ||
} | ||
if(args._.length > 0) | ||
@@ -20,3 +31,2 @@ { | ||
} | ||
if(args.delay) | ||
@@ -34,2 +44,5 @@ { | ||
/** | ||
* Show online help. | ||
*/ | ||
function help() | ||
@@ -41,6 +54,6 @@ { | ||
console.log(' --delay Delay the response for the given milliseconds'); | ||
process.exit(0); | ||
} | ||
testServer.startServer(options); | ||
testServer.startServer(options); | ||
@@ -29,1 +29,8 @@ | ||
### 2013-09-02: version 0.2.2 | ||
* Emergency fix for binary paths. | ||
Pull request #10 by to https://github.com/zaphod1984 | ||
* Fix library paths. | ||
* Added #env lines to binary paths to run on Unix-like systems. | ||
{ | ||
"name": "loadtest", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Run load tests for your web application. Mostly ab-compatible interface, with an option to force requests per second. Includes an API for automated load testing.", | ||
@@ -26,4 +26,4 @@ "homepage": "https://github.com/alexfernandez/loadtest", | ||
"bin": { | ||
"loadtest": "lib/bin/loadtest.js", | ||
"testserver-loadtest": "lib/bin/testserver.js" | ||
"loadtest": "bin/loadtest.js", | ||
"testserver-loadtest": "bin/testserver.js" | ||
}, | ||
@@ -30,0 +30,0 @@ "preferGlobal": true, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46336
1495