Commit fe30b034 authored by tonyg@chromium.org's avatar tonyg@chromium.org

[Telemetry] Shortcut 30s energy measurement if not supported.

This reduces telemetry_perf_unittests by 30s.

BUG=388256

Review URL: https://codereview.chromium.org/474493002

Cr-Commit-Position: refs/heads/master@{#289609}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289609 0039d316-1c4b-4281-b951-d872f2087c98
parent 82f0b48b
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment