# How to programmatically access Firefox power consumption metrics?

**URL:** https://discourse.mozilla.org/t/how-to-programmatically-access-firefox-power-consumption-metrics/137439
**Category:** Developer Community
**Created:** [November 25, 2024, 8:50am UTC](https://discourse.mozilla.org/t/how-to-programmatically-access-firefox-power-consumption-metrics/137439 "2024-11-25T08:50:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Son\_Pham](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@Son\_Pham](https://discourse.mozilla.org/u/Son_Pham)
#### Post date: [November 25, 2024, 8:50am UTC](https://discourse.mozilla.org/t/how-to-programmatically-access-firefox-power-consumption-metrics/137439/1 "2024-11-25T08:50:11Z")

</div>

I’m trying to measure power consumption in Firefox using automation. My goal is to get power consumption metrics for specific webpage loads.

What I’ve tried:

1. Using Puppeteer with Firefox’s profiler:
  - Enabled power profiling preferences
  - Used the Profiler CDP commands
  - Got profile data but no power metrics

I know Firefox DevTools has power profiling capabilities in the Performance panel, but I need to access this programmatically. Is there a way to:

1. Access the same power metrics that Firefox’s Performance panel shows?
2. Get power consumption data through Firefox’s debugging protocol or any other API?
3. Enable and collect power profiling data in an automated way?

Any guidance on the correct approach would be greatly appreciated!

---

<div class="post-metadata">

### Author: ![BENHAMMADI\_ILYAS](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/benhammadi_ilyas/32/72540_2.png) [@BENHAMMADI\_ILYAS](https://discourse.mozilla.org/u/BENHAMMADI_ILYAS)
#### Post date: [March 27, 2025, 10:23am UTC](https://discourse.mozilla.org/t/how-to-programmatically-access-firefox-power-consumption-metrics/137439/2 "2025-03-27T10:23:32Z")

</div>

Hello,

Have you found an answer to your question ?  
I am in need for an answer too.

Thank you
