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

Unified Diff: tools/perf/measurements/tab_switching.py

Issue 474493002: [Telemetry] Shortcut 30s energy measurement if not supported. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/measurements/tab_switching.py
diff --git a/tools/perf/measurements/tab_switching.py b/tools/perf/measurements/tab_switching.py
index d0012a407600cac0503988f2db8f1ba91b079d74..903cf14fa43739debba04c0e0589de5e3ef01f4b 100644
--- a/tools/perf/measurements/tab_switching.py
+++ b/tools/perf/measurements/tab_switching.py
@@ -62,10 +62,11 @@ class TabSwitching(page_test.PageTest):
# Measure power usage of tabs after quiescence.
util.WaitFor(tab.HasReachedQuiescence, 60)
- self._power_metric.Start(page, tab)
- time.sleep(TabSwitching.SAMPLE_TIME)
- self._power_metric.Stop(page, tab)
- self._power_metric.AddResults(tab, results,)
+ if tab.browser.platform.CanMonitorPower():
+ self._power_metric.Start(page, tab)
+ time.sleep(TabSwitching.SAMPLE_TIME)
+ self._power_metric.Stop(page, tab)
+ self._power_metric.AddResults(tab, results,)
histogram_name = 'MPArch.RWH_TabSwitchPaintDuration'
histogram_type = histogram_util.BROWSER_HISTOGRAM
« 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