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

Unified Diff: tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor.py

Issue 789853003: [Telemetry] Don't fail powermetrics unit tests when run on a VM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor.py
diff --git a/tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor.py b/tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor.py
index abb6fe9eebf3809ba827b562a2c613061243a2bb..b95ab260205d489d903cdfcc456f641c0e586144 100644
--- a/tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor.py
+++ b/tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor.py
@@ -140,6 +140,11 @@ class PowerMetricsPowerMonitor(power_monitor.PowerMonitor):
'%d', len(powermetrics_output))
return {}
+ # Powermetrics doesn't record power usage when running on a VM.
+ hw_model = plist.get('hw_model')
+ if hw_model and hw_model.startswith('VMware'):
+ return {}
+
if 'GPU' in plist:
metrics.extend([
ConstructMetric(
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/platform/power_monitor/powermetrics_power_monitor_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698