-
-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPU measurements seem not to reset between measurements (scripting) #4329
Comments
Hi @jannekalliola thank you for creating the issue. I'll get back tomorrow Tuesday when I have the time to check what's going on. |
Hi @jannekalliola I could verify the same. I checked the code and it seems correct in Browsertime (we parse the gecko driver log after each time we stop the test to get the metric). I think the root problem is in Firefox or maybe we do something wrong with the trace. I'll create an issue for Firefox later today. |
It seems like sitespeedio/browsertime#2220 also fixed this issue. Specifically this commit: sitespeedio/browsertime@9504fc7 Adding the same context here: First values in the counter samples have different meanings per platform. I'm assuming you have macOS with Apple Silicon chips, because this is the behavior I encountered while I was testing too. It seems like when we call the macOS API for getting the power usage values for the first time, it's returning a very high number, which @fqueze suspected that it's the power value since the process start time. This explains why we are seeing increasing amount of values in the sitespeed.io power metrics. It's because it's never being reset, so it's always include the power usage numbers since the process has started. To fix this, we simply ignore the initial values now in sitespeedio/browsertime@9504fc7. I tested with that PR applied on sitespeed.io and it seems like we are now getting expected values, like: So I think we can close this after sitespeedio/browsertime#2220 |
Have you read the documentation?
URL
https://www.builder.io/
What are you trying to accomplish
I'm trying to measure CPU power consumption of non-cached and cached pages. When I run the measurement three times (first non-cached and then twice cached), the CPU numbers are as follows:
0.0035 µWh
0.005 µWh
0.0057 µWh
The values are constantly rising, while the two latter runs are identical (and should be less heavy compared to the first one)
What browser did you use?
Firefox
How to reproduce
Log output
The text was updated successfully, but these errors were encountered: