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

Side by Side Diff: tools/perf/measurements/memory.py

Issue 1029263003: [telemetry] Sort imports in Telemetry and its dependents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure we're up to date. Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « tools/perf/measurements/media.py ('k') | tools/perf/measurements/memory_multi_tab.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from telemetry.page import page_test
6
5 from metrics import memory 7 from metrics import memory
6 from metrics import power 8 from metrics import power
7 from telemetry.page import page_test 9
8 10
9 class Memory(page_test.PageTest): 11 class Memory(page_test.PageTest):
10 def __init__(self): 12 def __init__(self):
11 super(Memory, self).__init__() 13 super(Memory, self).__init__()
12 self._memory_metric = None 14 self._memory_metric = None
13 self._power_metric = None 15 self._power_metric = None
14 16
15 def WillStartBrowser(self, platform): 17 def WillStartBrowser(self, platform):
16 self._power_metric = power.PowerMetric(platform) 18 self._power_metric = power.PowerMetric(platform)
17 19
18 def DidStartBrowser(self, browser): 20 def DidStartBrowser(self, browser):
19 self._memory_metric = memory.MemoryMetric(browser) 21 self._memory_metric = memory.MemoryMetric(browser)
20 22
21 def DidNavigateToPage(self, page, tab): 23 def DidNavigateToPage(self, page, tab):
22 self._memory_metric.Start(page, tab) 24 self._memory_metric.Start(page, tab)
23 self._power_metric.Start(page, tab) 25 self._power_metric.Start(page, tab)
24 26
25 def CustomizeBrowserOptions(self, options): 27 def CustomizeBrowserOptions(self, options):
26 memory.MemoryMetric.CustomizeBrowserOptions(options) 28 memory.MemoryMetric.CustomizeBrowserOptions(options)
27 # Since this is a memory benchmark, we want to sample memory histograms at 29 # Since this is a memory benchmark, we want to sample memory histograms at
28 # a high frequency. 30 # a high frequency.
29 options.AppendExtraBrowserArgs('--memory-metrics') 31 options.AppendExtraBrowserArgs('--memory-metrics')
30 32
31 def ValidateAndMeasurePage(self, page, tab, results): 33 def ValidateAndMeasurePage(self, page, tab, results):
32 self._power_metric.Stop(page, tab) 34 self._power_metric.Stop(page, tab)
33 self._memory_metric.Stop(page, tab) 35 self._memory_metric.Stop(page, tab)
34 self._memory_metric.AddResults(tab, results) 36 self._memory_metric.AddResults(tab, results)
35 self._power_metric.AddResults(tab, results) 37 self._power_metric.AddResults(tab, results)
OLDNEW
« no previous file with comments | « tools/perf/measurements/media.py ('k') | tools/perf/measurements/memory_multi_tab.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698