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.73k stars 600 forks source link

Monitor and store Js consumption #3151

Open Ludovic33Fr opened 3 years ago

Ludovic33Fr commented 3 years ago

We use the option --cpu to troubleshoot the js consumption per ressources or per domain. It is very usefull to diagnostic on a snapshoot.

It will be very usefull if we could store on grafana these informations into graphite. It could be help to track and detect regression on internal or external js.

Do you think that this kind of enhancement could be done ?

Best, Ludovic

soulgalore commented 3 years ago

Hi @Ludovic33Fr I think its hard to act on. If you use Chrome then we get that information from the trace log, grouped by domain (in the HTML result) if I remember correctly. So that data could be sent to Graphite just by configuration.

I haven't looked at it for a year or so but before that calculation wasn't accurate, I think the browser misses time spent and it was really unstable, so it was hard to make rules like if the time spent on X domain increased by 10% then alert. Also it hard to get that stable metrics I think. But can you do a couple or runs and see if the correct metrics is picked up and it looks ok then maybe we can have a look again and I can help you with configuration to get the data? Also data per domain in Graphite is kind of evil, since it will allocate space per domain, so for example if you use many third party scripts that changes over time (changes domains etc) it will allocate a lot of disk space.

Ludovic33Fr commented 3 years ago

Hi @soulgalore , thank you for your reply. "So that data could be sent to Graphite just by configuration." : could you confirm me that it is already enable to store it by configuration.

About the relevance of these data : We have many tests run everyday on our website. I checked these values (js consumption per domain / per ressources) on five runs on the same days.

image

In deed there is some volatily inside a same domain for each run. However there is consistency in values ​​between each domains. This makes it possible to have a coherent relative comparison and above all a monitoring of these areas over time if storage is possible. These feature could be very usefull to track regression of third party