svenkatreddy / puppeteer-loadtest

load test puppeteer (Headless Chrome API) script using node
Apache License 2.0
119 stars 21 forks source link

Wait X seconds to start another instance of Chromium #86

Open eddiek50 opened 2 years ago

eddiek50 commented 2 years ago

Hi there, I'm using puppeteer-loadtest to initiate a lot of Chromium instances and the startup performance of Chromium is too high which interferes with the tests. Right now I'm using this command to run 50 instances of Chromium:

puppeteer-loadtest --s=1 --c=50 --file=sample.js

I think I've done everything that could be done to improve Chromium's startup performance, so now I'm wondering if it's possible to add a bit of a waiting time between each one of the 50 instances that get created with puppeteer-loadtest - maybe there's a parameter that I don't know about? Thanks in advance

svenkatreddy commented 2 years ago

Hi, thanks for your patience. currently there is no parameter to limit time between each instance is created.

Some alternatives: run a single sample in bash script which repeats every x seconds ? example:

#!/bin/bash
PATH="/root/.nvm/versions/node/v6.10.0/bin:$PATH"
for i in {1..50}
do
   puppeteer-loadtest --s=1 --c=1 --file=sample.js
   sleep 60
done