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.5 to 0.2.6

3

bin/loadtest.js
#!/usr/bin/env node
'use strict';

@@ -18,3 +19,3 @@ /**

// is there an url? if not, break and display help
if(args._.length == 0)
if(args._.length === 0)
{

@@ -21,0 +22,0 @@ help();

#!/usr/bin/env node
'use strict';

@@ -35,3 +36,3 @@ /**

{
options.delay = parseInt(args.delay);
options.delay = parseInt(args.delay, 10);
}

@@ -38,0 +39,0 @@ else

@@ -57,1 +57,7 @@

### 2013-09-30: version 0.2.6
* Use the deployment module.
* Correct support for https.

@@ -10,9 +10,9 @@ 'use strict';

// requires
require('./prototypes.js');
require('prototypes');
var testing = require('testing');
var urlLib = require('url');
var http = require('http');
var https = require('https');
var Log = require('log');
var timing = require('./timing.js');
var websocket = require('./websocket.js');

@@ -51,6 +51,4 @@ // globals

{
if (params.agentKeepAlive)
{
}
options = urlLib.parse(params.url);
log.info('Options: %j', options);
options.headers = {};

@@ -134,3 +132,8 @@ if (!params.agent)

var requestFinished = getRequestFinisher(id);
var request = http.request(options, getConnect(id, requestFinished));
var lib = http;
if (options.protocol == 'https:')
{
lib = https;
}
var request = lib.request(options, getConnect(id, requestFinished));
if (message)

@@ -237,9 +240,10 @@ {

}
if (options.url.startsWith('ws://'))
if (options.url.startsWith('http:') || options.url.startsWith('https:'))
{
constructor = websocket.WebSocketClient;
constructor = HttpClient;
}
else if (options.url.startsWith('http'))
else
{
constructor = HttpClient;
log.error('Invalid URL %s, must be http:// or https://', options.url);
return;
}

@@ -246,0 +250,0 @@ options.concurrency = options.concurrency || 1;

@@ -10,3 +10,3 @@ 'use strict';

// requires
require('./prototypes.js');
require('prototypes');
var loadtest = require('./loadtest.js');

@@ -13,0 +13,0 @@ var testserver = require('./testserver.js');

@@ -10,3 +10,3 @@ 'use strict';

// requires
require('./prototypes.js');
require('prototypes');
var http = require('http');

@@ -13,0 +13,0 @@ var util = require('util');

@@ -10,3 +10,3 @@ 'use strict';

// requires
require('./prototypes.js');
require('prototypes');
var testing = require('testing');

@@ -13,0 +13,0 @@ var util = require('util');

@@ -10,3 +10,3 @@ 'use strict';

// requires
require('./prototypes.js');
require('prototypes');
var WebSocketClient = require('websocket').client;

@@ -13,0 +13,0 @@ var testing = require('testing');

{
"name": "loadtest",
"version": "0.2.5",
"version": "0.2.6",
"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.",

@@ -14,2 +14,3 @@ "homepage": "https://github.com/alexfernandez/loadtest",

"dependencies": {
"prototypes": "*",
"websocket": "*",

@@ -16,0 +17,0 @@ "testing": "*",

@@ -23,3 +23,3 @@ 'use strict';

var tests = {};
var libs = [ 'prototypes', 'timing', 'sample', 'websocket', 'loadtest' ];
var libs = [ 'timing', 'sample', 'websocket', 'loadtest' ];
libs.forEach(function(lib)

@@ -26,0 +26,0 @@ {

Sorry, the diff of this file is not supported yet

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