New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

puppeteer-loadtest

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puppeteer-loadtest

loadtest puppeteer (Headless Chrome API) script using node

  • 2.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

puppeteer-loadtest

Build Status

NPM

puppeteer-loadtest provides a simple way to launch multiple puppeteer instances in parallel to run a simple load test on your site.

Installation

Install via npm:

$ npm install -g puppeteer-loadtest

Usage

To run a basic load test, just supply the name of a puppeteer script to run:

$ puppeteer-loadtest --file=sample.js

This will run the specified puppeteer script once in chrome headless instance.

Parameters

--s flag is to mention sample size --c flag is to mention number of concurrent executions per sample --silent boolean to enable or disable logs --outputFile send performance results to output file

$ puppeteer-loadtest --s=100 --c=25 --file=sample.js

This will run a total of 100 runs through the specified puppeteer script across 25 concurrent chrome headless instances.

Examples

$ puppeteer-loadtest --file=sample.js

$ puppeteer-loadtest --file=./test/sample.js  --s=100 --c=25

$ puppeteer-loadtest --file=./test/sample.js  --s=100 --c=25 --silent=true

$ puppeteer-loadtest --file=./test/sample.js  -s 100 -c 25

$ puppeteer-loadtest --file=./test/sample.js  -s 100 -c 25 --outputFile=performance.json

use as node module

```
const startPuppeteerLoadTest = require('puppeteer-loadtest');
const results = await startPuppeteerLoadTest({
    file, // path to file
    samplesRequested, // number of samples requested
    concurrencyRequested, // number of concurrency requested
});
console.log(results);
```

Contributors

David Madden

yuji38kwmt

Feedback

please provide feedback or feature requests using issues link

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Keywords

FAQs

Package last updated on 04 Oct 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc