Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1772)

Unified Diff: tools/perf/metrics/power.py

Issue 2270093002: Add CPU measurements to power metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/power.py
diff --git a/tools/perf/metrics/power.py b/tools/perf/metrics/power.py
index 09fe49fe4b93fd8ca98b81225f8d4208745cde2c..8e5453a61957f271b82d097ab883ad982fc41082 100644
--- a/tools/perf/metrics/power.py
+++ b/tools/perf/metrics/power.py
@@ -160,6 +160,19 @@ class PowerMetric(Metric):
results.current_page, 'gpu_average_frequency_hz', 'hz', gpu_freq_hz,
important=False))
+ # GPU Frequency.
+ chrome_power = component_utilization.get('chrome', None)
+ if chrome_power is not None:
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, 'cputime', 'ms per s',
+ chrome_power['cputime_ms_per_s'], important=False))
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, 'energy_impact', 'unitless',
+ chrome_power['energy_impact'], important=False))
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, 'idle_wakeups', '# per s',
+ chrome_power['idle_wakeups_per_s'], important=False))
+
# Add idle wakeup numbers for all processes.
for (process_type, stats) in self._results.get('cpu_stats', {}).items():
trace_name_for_process = 'idle_wakeups_%s' % (process_type.lower())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698