Socket
Socket
Sign inDemoInstall

anfordern

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    anfordern

Tool to stress test servers


Version published
Weekly downloads
3
Maintainers
1
Created
Weekly downloads
 

Readme

Source

ANDFORDERN

A tool to stress test http/https protocols

USING

To use this, you must first create a new object and call a method. Suggest using the flag --max_old_space_size=<size> to increase the amount of ram your APP can use.

Creating
const Anfordern = require('anfordern');

let anfordern = new Anfordern({
    url: "your URL",   // must be a string with a valid protocol
    timer: 1000, // must be a number in ms
    headers: { key: "value" }
});
Methods
MethodArgumentsreturnsDescription
.start()function(err, data)err if an error occurs
data what the server sends back
Starts sending requests at set interval
.cluster()function(err, pid, data)err if an error occurs
pid the process id of our worker
data what the server sends back
Clusters the app and send more than one request at each interval

Example

const Anfordern = require('anfordern');

let anfordern = new Anfordern({
    url: process.env.URL,
    timer: 1000
});

anfordern.cluster(function(err, pid, data) {
    if(err) console.log(pid, err);
    console.log(data);
})
DISCLAIMER:

Do not use this tool for anything that might be considered questionable. I am not responsible for how this tool is used. Use this only on your own hardware.

Keywords

FAQs

Last updated on 03 May 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc