Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

loadtest

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loadtest - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

33

bin/loadtest.js

@@ -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,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc