sitespeedio / sitespeed.io

sitespeed.io is an open-source tool for comprehensive web performance analysis, enabling you to test, monitor, and optimize your website’s speed using real browsers in various environments.
https://www.sitespeed.io/
MIT License
4.72k stars 597 forks source link

High Response times #4186

Open ghost opened 2 months ago

ghost commented 2 months ago

Your question

To measure response times for a UI web application, I ran sitespeed scripts using a docker command. I am experiencing high response times compared to manually calculated response times. Can you please let me know what could be the reason for this?

The command used to run is: docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io XXX.js --spa --multi --viewPort 1786x708 --maxLoadTime 180000 --video=false --plugins.remove screenshot -n 1 -b chrome

soulgalore commented 2 months ago

Hi @mthallu-cadent can you show me how much and what you mean by response time and how you compare and I'll try to help you!

ghost commented 2 months ago

So, I captured fully loaded time. Can you please tell me which metric I should consider to calculate loading time for a web page. I was checking fully loaded time Fully Loaded [median] 8.424 s and was comparing with manually recorded time.

Previously I used to run Jmeter+selenium scripts. So the response times from them were comparable to manually recorded responses times. Now I am seeing bit high response times. Can you please help me with this.

soulgalore commented 2 months ago

So by response time do you mean time to first byte or fully loaded (the time time it takes for all requests to be downloaded in the browser meaning HTML/CSS/JS/Images)? There's some definitions here: https://www.sitespeed.io/documentation/sitespeed.io/metrics/

I think it's hard to compare between tools, if you use sitespeed.io you'll use a real browser, jmeter I don't think not.

Comparing metrics between manually testing vs automation, it depends on setup. What you can do is to look at the HAR/waterfall chart in your browser and compare it with the one produced by sitespeed.io just to see where the difference are.

ghost commented 2 months ago

Sitespeed.io collects extensive client-side performance data, including rendering times, JavaScript execution times, and various visual rendering metrics such as time to first paint and time to interactive right.

Will all these activities included in fully loaded time?

soulgalore commented 2 months ago

Fully load time means that all requests and responses are done, the browser has downloaded all the assets that belong to the page. It do not mean that anything has rendered or all JavaScript is executed. I know the list in https://www.sitespeed.io/documentation/sitespeed.io/metrics/ is massive but most information is in there :)