Closed
Bug 1204787
Opened 9 years ago
Closed 9 years ago
Add |mach power|
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
(Whiteboard: [Power])
Attachments
(1 file, 1 obsolete file)
6.18 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
I have a shell script that runs tools/power/rapl and powermetrics and extracts the most useful stat from them for Firefox, Safari and Chrome. It has become my starting point for evaluating power consumption on any new website. Example output can be seen in bug 1190719 comment 17. I want to get this in the tree so other people can use it.
Assignee | ||
Comment 1•9 years ago
|
||
There is a "njn" comment in there for something I didn't know how to do -- check if we're running on Mac OS X 10.10 or later.
Attachment #8661088 -
Flags: review?(mh+mozilla)
Comment 2•9 years ago
|
||
Comment on attachment 8661088 [details] [diff] [review] Add |mach power| Review of attachment 8661088 [details] [diff] [review]: ----------------------------------------------------------------- ::: tools/power/mach_commands.py @@ +23,5 @@ > + MachCommandBase.__init__(self, context) > + > + @Command('power', category='misc', > + # njn: want to check for Mac 10.10 or above here... > + #conditions=[...], You want to give a function that checks StrictVersion(platform.mac_ver()[0]) >= StrictVersion('10.10'), where StrictVersion is imported from distutils.version. @@ +102,5 @@ > + # could do this by properly parsing powermetrics output, but it's > + # simpler and more robust to just grep for a handful of identifying > + # strings. > + > + print() Why the empty line?
Attachment #8661088 -
Flags: review?(mh+mozilla) → feedback+
Assignee | ||
Comment 3•9 years ago
|
||
> > + print()
>
> Why the empty line?
So there's a blank line between the rapl output and the powermetrics output. I'll add a comment.
Assignee | ||
Comment 4•9 years ago
|
||
Now with a proper "OS X 10.10 or greater" condition.
Attachment #8662153 -
Flags: review?(mh+mozilla)
Assignee | ||
Updated•9 years ago
|
Attachment #8661088 -
Attachment is obsolete: true
Comment 5•9 years ago
|
||
Comment on attachment 8662153 [details] [diff] [review] Add |mach power| Review of attachment 8662153 [details] [diff] [review]: ----------------------------------------------------------------- ::: tools/power/mach_commands.py @@ +18,5 @@ > + > + > +def is_osx_10_10_or_greater(cls): > + import platform > + mac_ver0 = platform.mac_ver()[0] release would be a more explicit name than mac_ver0, and matches the definition of what mac_ver() returns. @@ +110,5 @@ > + # could do this by properly parsing powermetrics output, but it's > + # simpler and more robust to just grep for a handful of identifying > + # strings. > + > + print() You forgot comment 3.
Attachment #8662153 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 7•9 years ago
|
||
I documented this at https://developer.mozilla.org/en-US/docs/Mozilla/Performance/powermetrics#mach_power and added links to it from https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Power_profiling_overview and https://developer.mozilla.org/en-US/docs/Mozilla/Performance/tools_power_rapl.
Comment 8•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c7cc8e32b62f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•