Screen capture of a website performance capture viewed in the Firefox Profiler. The highlight of the screenshot is the appearance of CO2e estimates alongside power usage figures.
Screen capture of a website performance capture viewed in the Firefox Profiler.

CO2e estimates in Firefox Profiler

Okay, this is wild. Not in my wildest dreams did I ever think I'd make a contribution to a Mozilla/Firefox project.

The latest version of the Firefox Profiler went live a couple of days ago (Jan. 10, 2023 - here's the PR). It included an update to the tooltip that gets displayed when power consumption information is available in a profile recording. Now, folks who capture power usage in a profile will see a CO2e (carbon dioxide equivalent) estimate alongside the energy usage figure.

Here's a public profile that you can play around with. Find one of the Power tracks, and hover your mouse over it to reveal the tooltip.

As I noted in the COP27 webpage sustainability review that I did late last year, the CO2e figure shown isn't perfect, but it's a start! Some things to note for now, and that we're thinking about for the future are:

  • The CO2e figures are generated using global average grid intensity figures for 2021, which are imported into the project from CO2.js. Ideally, we’d like to use region-specific figures for even greater detail. There’s been some conversation around this as part of the PR for this feature.
  • I honestly have no idea whether looking at CPU package, CPU cores, iGPU, or DRAM would be the right approach here. There are some details documented in the Firefox Source Docs, but I’ve yet to go into detail on that.