I'm building a web performance suite for a client which measures stuff like amount of JS files, amount of images, total image size,... for webpages of their clients, so no root access to the webservers. Two of the things I need to measure are 1) total page load time and 2) total website CPU usage. I'm currently trying to figure how this can be done.
Regarding 1) it seems the best option I have is to start a times before doing a cURL request and stop the timer when the request is done. Problem is I'm not sure if that also includes the time it would take to render the page and perform any Javascript operations that get triggered on page load. My guess is no, which would make this a very inaccurate measurement
Number 2) seems just impossible to me. I'd have to profile the machine on which the actual website is running, which seems impossible.
I was just wondering if anyone here had any experience with something similar and could help me out.