Closed Bug 1525804 Opened 6 years ago Closed 1 year ago

Integrate windows 10 arm64 power usage gathering into raptor.

Categories

(Testing :: Raptor, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sparky, Unassigned)

References

Details

Attachments

(1 file)

This bug is for integrating a windows10 arm64 power usage runner into raptor. Based on bug 1522175, we can use parts of the powercfg gathering and parsing tool found here: https://github.com/gmierz/powerusage-windows-arm64

The class WinPowerUsage in the file windows_powerusage.py can be added to mozharness/mozharness/mozilla/testing/raptor.py.

Note that two things need to be done to run powercfg through python - they can be done automatically in the script mentioned above:
(1): Requires Administrator mode.
(2): File System Redirection must be disabled.

Here's a file for raptor which makes use of the power usage measurement tool - giving us a global measure of power usage for the raptor test when run. It makes use of windows_powerusage.py (mentioned in the comments above).

I think it could be more granular than this as well by starting and stopping in different areas.

:rwood, would you know of another place I could start/stop recording the power usage data? Right now, I start gathering data here, and end gathering right after the command returns.

Flags: needinfo?(rwood)

(In reply to Greg Mierzwinski [:sparky] from comment #3)

:rwood, would you know of another place I could start/stop recording the power usage data? Right now, I start gathering data here, and end gathering right after the command returns.

This is exciting! I would suggest following the method that Raptor already uses to gather power usage data on Android (which :bc implemented) so that we can keep it consistent in Raptor.

For Android, the code that initiates measuring power (and stops it) is included in Raptor here, it would be cool if you added your Windows power methods here too:

https://searchfox.org/mozilla-central/source/testing/raptor/raptor/power.py

And you'll see the power test is initiated in the main Raptor code here:

https://searchfox.org/mozilla-central/rev/5e3bffe964110b8d1885b4236b8abd5c94d8f609/testing/raptor/raptor/raptor.py#130

and finish is called at all the places where the test may finish. i.e.:

https://searchfox.org/mozilla-central/rev/5e3bffe964110b8d1885b4236b8abd5c94d8f609/testing/raptor/raptor/raptor.py#424

The Android power test code submits the power data to the Raptor control server here:

https://searchfox.org/mozilla-central/rev/5e3bffe964110b8d1885b4236b8abd5c94d8f609/testing/raptor/raptor/raptor.py#424

Which is submitted to Raptor as 'supporting data', here:

https://searchfox.org/mozilla-central/rev/00c0d068ece99717bea7475f7dc07e61f7f35984/testing/raptor/raptor/results.py#41

And in turn is processed in output (a separate PERFHERDER_DATA json output blob is created for the supporting power data):

https://searchfox.org/mozilla-central/rev/00c0d068ece99717bea7475f7dc07e61f7f35984/testing/raptor/raptor/output.py#157

It would be good to keep any supporting test data consistent with this flow/frameork. Hope that helps! Any questions feel free to email or ping me, thanks!

Flags: needinfo?(rwood)
Depends on: 1567954
Priority: -- → P3
Severity: normal → S3
Component: Performance → Raptor
Version: Version 3 → unspecified

We're no longer testing against this platform.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: