Socket
Socket
Sign inDemoInstall

loadtest

Package Overview
Dependencies
5
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.15 to 0.1.16

2

lib/loadtest.js

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

}
var interval = Math.round(1000 / params.requestsPerSecond);
var interval = 1000 / params.requestsPerSecond;
requestTimer = new timing.HighResolutionTimer(interval, self.makeRequest);

@@ -109,0 +109,0 @@ }

@@ -357,4 +357,5 @@ 'use strict';

/**
* A high resolution timer.
* Initialize with milliseconds to wait and the callback to call.
* A high resolution timer. Params:
* - delayMs: miliseconds to wait before calls. Can be fractional.
* - callback: function to call every time.
*/

@@ -383,2 +384,7 @@ exports.HighResolutionTimer = function(delayMs, callback)

var diff = (Date.now() - start) - counter * delayMs;
var timeout = Math.floor(delayMs - diff);
if (timeout <= 0)
{
return delayed();
}
setTimeout(delayed, delayMs - diff);

@@ -385,0 +391,0 @@ }

{
"name": "loadtest",
"version": "0.1.15",
"version": "0.1.16",
"description": "Run load tests for your web application. Mostly ab-compatible interface, with an option to force requests per second. API for automated load testing.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/alexfernandez/loadtest",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc