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

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

Issue 649903003: [Telemetry] Fix application_energy_consumption output. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 a1e77ad3eb024aef42a5e3769e5e1709a3e03d22..0f33d2d41b19d751ae52f70c413578fe4e1c4798 100644
--- a/tools/perf/metrics/power.py
+++ b/tools/perf/metrics/power.py
@@ -102,7 +102,9 @@ class PowerMetric(Metric):
self._results.get('application_energy_consumption_mwh'))
total_energy_consumption_mwh = self._results.get('energy_consumption_mwh')
- if not application_energy_consumption_mwh and total_energy_consumption_mwh:
+ if (PowerMetric._quiescent_power_draw_mwh and
+ application_energy_consumption_mwh is None and
+ total_energy_consumption_mwh is not None):
application_energy_consumption_mwh = max(
total_energy_consumption_mwh - PowerMetric._quiescent_power_draw_mwh,
0)
« 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