sitespeedio / sitespeedio/sitespeed.io

Understanding power measurement better

Open
#4,569 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5k
Forks
624
Avg merge
4h 8m
Merged PRs (30d)
2

Description

Your question

Hi
I am currently trying to get a more or less accurate power consumption value from browsertime.
Following this example: https://github.com/sitespeedio/sitespeed.io/issues/3944#issuecomment-1874409458
I get the initial info in my terminal:
INFO: CPU / Power usage: 7334 which I guess is in µWh.

If I open the browsertime.json I see this:
"powerConsumption":[0.003353606209]
and "powerConsumption":{"median":0.0034, ...

Now the numbers are pretty close to each other. But what is the difference? I also had the case that they differed quite a bit.
The first [0].info.powerConsumption and the second is [0].info.statistics.powerConsumption.

Also I don't understand the key cpu which is the number from before 7334.
So is this just the Power used by the CPU? What about GPU for example?
Is GPU taken into account in one of the powerConsumption keys?

If I then open the saved profile (attached) I see in the parent process → process power: 2.1mWh in the full range.
How is that value linked to the powerConsumption in the browsertime summary?

In the process github.com itself I see 967 µWh for the full range.

I also wonder: Which number would go up if I had power intensive tasks running in the background on my machine?
Would all be affected?

Maybe somebody could help me out to understand which of the values would be most accurate number to measure if I want to find out about the power consumption of one page.

🙏

Image

geckoProfile-1.json.gz

browsertime.json

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked example comment and compare the attached browsertime.json with geckoProfile-1.json.gz, focusing on info.powerConsumption, statistics.powerConsumption, cpu, and the process power values. Trace where these values enter the Browsertime summary and document their units, scope, and relationship. Done means the documentation explains which value represents page power and how background activity affects each measurement.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.