svenkatreddy / puppeteer-loadtest

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

Results with concurrency test is kind of misleading. #40

Open raivndra opened 4 years ago

raivndra commented 4 years ago

Hi @svenkatreddy,

I have run the test with 5 concurrent users and the stats of the test are as below.

command used for running the test:- _puppeteer-loadtest --file=test.js --s=1 --c=5

**stats for concurrent test starts**

puppeteer-loadtest puppeteer-loadtest is loading... +0ms puppeteer-loadtest sample: 1 +25s puppeteer-loadtest concurrent: 1 +0ms puppeteer-loadtest sample: 1 +2s puppeteer-loadtest concurrent: 2 +0ms puppeteer-loadtest sample: 1 +53ms puppeteer-loadtest concurrent: 3 +0ms puppeteer-loadtest sample: 1 +495ms puppeteer-loadtest concurrent: 4 +1ms puppeteer-loadtest sample: 1 +273ms puppeteer-loadtest concurrent: 5 +0ms

****stats for concurrent test ends*****

From the above the statistics if you observe the first sample is 25 secs and subsequent samples time are in Milliseconds, I assume the results may vary for each user but in the above results the deviation is high, however when I run the test with non headless mode notice that all the browsers instances are taking relatively similar time. Correct if my understanding is not correct in how to use the puppeteer-loadtest.

Basically i want to mimic a scenario where 100 users are the accessing the web app and collect the performance metrics when the web app is under load.

thanks, Ravindra

raivndra commented 4 years ago
Screenshot 2020-07-21 at 9 16 07 PM
svenkatreddy commented 4 years ago

@raivndra Thanks for reporting this. In this module, we are using a package called debug. The way debug works is it reports the time between each statement. The first 25 seconds is the amount of time the first time debug statement hit. concurrent ones are for other debug statements after the previous debug statement. debug is mainly for developers of puppeteer-loadtest. However, we could add real statistics on how much time each process concurrency took. I would like to know more requirements about what kind of statistics are preferred?

raivndra commented 4 years ago

Hi @svenkatreddy,

Thanks for the reply! Basically I'm trying to collect performance metrics when a particular page is visited, I'm assuming sample time is the total time taken for a web page to load including network calls as well.

"sample times for each concurrency logged on the console" should do for now but the catch is if someone is testing 100 concurrent users test you will be printing on the console 100 times for each user request, instead what can be done is taking the Average, Min and Max times of all the 100 concurrent requests will help a lot in analyzing the performance with load testing.

Thanks, Ravindra

svenkatreddy commented 4 years ago

Thanks for the inputs. Will add to the roadmap.

svenkatreddy commented 3 years ago

@raivndra I updated package to support outputFile which now prints performance results in a json format in a nice and correct way. Please let me know if you still see any issues.