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

Side by Side Diff: tools/perf/measurements/memory_multi_tab.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/memory.py ('k') | tools/perf/measurements/oilpan_gc_times.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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 """Multi tab memory test. 5 """Multi tab memory test.
6 6
7 This test is a multi tab test, but we're interested in measurements for 7 This test is a multi tab test, but we're interested in measurements for
8 the entire test rather than each single page. 8 the entire test rather than each single page.
9 """ 9 """
10 10
11 from telemetry.page import page_test
11 12
12 from metrics import memory 13 from metrics import memory
13 from telemetry.page import page_test 14
14 15
15 class MemoryMultiTab(page_test.PageTest): 16 class MemoryMultiTab(page_test.PageTest):
16 def __init__(self): 17 def __init__(self):
17 super(MemoryMultiTab, self).__init__() 18 super(MemoryMultiTab, self).__init__()
18 self._memory_metric = None 19 self._memory_metric = None
19 # _first_tab is used to make memory measurements 20 # _first_tab is used to make memory measurements
20 self._first_tab = None 21 self._first_tab = None
21 22
22 def DidStartBrowser(self, browser): 23 def DidStartBrowser(self, browser):
23 self._memory_metric = memory.MemoryMetric(browser) 24 self._memory_metric = memory.MemoryMetric(browser)
(...skipping 11 matching lines...) Expand all
35 # Start measurement on the first tab. 36 # Start measurement on the first tab.
36 if not self._first_tab: 37 if not self._first_tab:
37 self._memory_metric.Start(page, tab) 38 self._memory_metric.Start(page, tab)
38 self._first_tab = tab 39 self._first_tab = tab
39 40
40 def ValidateAndMeasurePage(self, page, tab, results): 41 def ValidateAndMeasurePage(self, page, tab, results):
41 # Finalize measurement on the last tab. 42 # Finalize measurement on the last tab.
42 if len(tab.browser.tabs) == len(page.page_set.pages): 43 if len(tab.browser.tabs) == len(page.page_set.pages):
43 self._memory_metric.Stop(page, self._first_tab) 44 self._memory_metric.Stop(page, self._first_tab)
44 self._memory_metric.AddResults(self._first_tab, results) 45 self._memory_metric.AddResults(self._first_tab, results)
OLDNEW
« no previous file with comments | « tools/perf/measurements/memory.py ('k') | tools/perf/measurements/oilpan_gc_times.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698