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

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

Issue 395133008: [telemetry] rasterize_and_record_micro: Increase timeout for document to load (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace tab.WaitForJavaScriptExpression() by tab.WaitForDocumentReadyStateToBeComplete() Created 6 years, 5 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 | « no previous file | no next file » | 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 import sys 5 import sys
6 import time 6 import time
7 7
8 from telemetry.core.util import TimeoutException 8 from telemetry.core.util import TimeoutException
9 from telemetry.page import page_measurement 9 from telemetry.page import page_measurement
10 from telemetry.page import page_test 10 from telemetry.page import page_test
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 backend = browser._browser_backend # pylint: disable=W0212 51 backend = browser._browser_backend # pylint: disable=W0212
52 self._chrome_branch_number = getattr(backend, 'chrome_branch_number', None) 52 self._chrome_branch_number = getattr(backend, 'chrome_branch_number', None)
53 if (not self._chrome_branch_number or 53 if (not self._chrome_branch_number or
54 (sys.platform != 'android' and self._chrome_branch_number < 1713)): 54 (sys.platform != 'android' and self._chrome_branch_number < 1713)):
55 raise page_test.TestNotSupportedOnPlatformFailure( 55 raise page_test.TestNotSupportedOnPlatformFailure(
56 'rasterize_and_record_micro requires Chrome branch 1713 ' 56 'rasterize_and_record_micro requires Chrome branch 1713 '
57 'or later. Skipping measurement.') 57 'or later. Skipping measurement.')
58 58
59 def MeasurePage(self, page, tab, results): 59 def MeasurePage(self, page, tab, results):
60 try: 60 try:
61 tab.WaitForJavaScriptExpression("document.readyState == 'complete'", 10) 61 tab.WaitForDocumentReadyStateToBeComplete()
62 except TimeoutException: 62 except TimeoutException:
tonyg 2014/07/18 15:17:27 This is something for a follow-up CL, not this one
63 pass 63 pass
64 time.sleep(self.options.start_wait_time) 64 time.sleep(self.options.start_wait_time)
65 65
66 record_repeat = self.options.record_repeat 66 record_repeat = self.options.record_repeat
67 rasterize_repeat = self.options.rasterize_repeat 67 rasterize_repeat = self.options.rasterize_repeat
68 # Enqueue benchmark 68 # Enqueue benchmark
69 tab.ExecuteJavaScript(""" 69 tab.ExecuteJavaScript("""
70 window.benchmark_results = {}; 70 window.benchmark_results = {};
71 window.benchmark_results.done = false; 71 window.benchmark_results.done = false;
72 window.benchmark_results.id = 72 window.benchmark_results.id =
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 results.current_page, 'total_layers', 'count', total_layers)) 144 results.current_page, 'total_layers', 'count', total_layers))
145 results.AddValue(scalar.ScalarValue( 145 results.AddValue(scalar.ScalarValue(
146 results.current_page, 'total_picture_layers', 'count', 146 results.current_page, 'total_picture_layers', 'count',
147 total_picture_layers)) 147 total_picture_layers))
148 results.AddValue(scalar.ScalarValue( 148 results.AddValue(scalar.ScalarValue(
149 results.current_page, 'total_picture_layers_with_no_content', 'count', 149 results.current_page, 'total_picture_layers_with_no_content', 'count',
150 total_picture_layers_with_no_content)) 150 total_picture_layers_with_no_content))
151 results.AddValue(scalar.ScalarValue( 151 results.AddValue(scalar.ScalarValue(
152 results.current_page, 'total_picture_layers_off_screen', 'count', 152 results.current_page, 'total_picture_layers_off_screen', 'count',
153 total_picture_layers_off_screen)) 153 total_picture_layers_off_screen))
OLDNEW
« 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