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

Side by Side Diff: tools/telemetry/telemetry/page/page_runner.py

Issue 694893004: telemetry: Report error correctly on connection timeout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused vars Created 6 years, 1 month 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 | tools/telemetry/telemetry/page/page_runner_unittest.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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 logging 5 import logging
6 import optparse 6 import optparse
7 import os 7 import os
8 import random 8 import random
9 import sys 9 import sys
10 import time 10 import time
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 if finder_options.profiler: 283 if finder_options.profiler:
284 state.StopProfiling() 284 state.StopProfiling()
285 285
286 if (test.StopBrowserAfterPage(state.browser, page)): 286 if (test.StopBrowserAfterPage(state.browser, page)):
287 state.StopBrowser() 287 state.StopBrowser()
288 288
289 return 289 return
290 except exceptions.BrowserGoneException as e: 290 except exceptions.BrowserGoneException as e:
291 state.StopBrowser() 291 state.StopBrowser()
292 if attempt_num == max_attempts: 292 if attempt_num == max_attempts:
293 logging.error('Aborting after too many retries') 293 results.AddValue(failure.FailureValue.FromMessage(
294 raise 294 page, 'Failed to connect to browser after too many retries.'))
295 if test.is_multi_tab_test: 295 elif test.is_multi_tab_test:
296 logging.error('Aborting multi-tab test after browser crashed') 296 logging.error('Aborting multi-tab test after browser crashed')
297 raise 297 raise
298 logging.warning(str(e)) 298 else:
299 logging.warning(str(e))
299 300
300 301
301 @decorators.Cache 302 @decorators.Cache
302 def _UpdatePageSetArchivesIfChanged(page_set): 303 def _UpdatePageSetArchivesIfChanged(page_set):
303 # Scan every serving directory for .sha1 files 304 # Scan every serving directory for .sha1 files
304 # and download them from Cloud Storage. Assume all data is public. 305 # and download them from Cloud Storage. Assume all data is public.
305 all_serving_dirs = page_set.serving_dirs.copy() 306 all_serving_dirs = page_set.serving_dirs.copy()
306 # Add individual page dirs to all serving dirs. 307 # Add individual page dirs to all serving dirs.
307 for page in page_set: 308 for page in page_set:
308 if page.is_file: 309 if page.is_file:
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 logging.warning('Device is thermally throttled before running ' 530 logging.warning('Device is thermally throttled before running '
530 'performance tests, results will vary.') 531 'performance tests, results will vary.')
531 532
532 533
533 def _CheckThermalThrottling(platform): 534 def _CheckThermalThrottling(platform):
534 if not platform.CanMonitorThermalThrottling(): 535 if not platform.CanMonitorThermalThrottling():
535 return 536 return
536 if platform.HasBeenThermallyThrottled(): 537 if platform.HasBeenThermallyThrottled():
537 logging.warning('Device has been thermally throttled during ' 538 logging.warning('Device has been thermally throttled during '
538 'performance tests, results will vary.') 539 'performance tests, results will vary.')
OLDNEW
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/page_runner_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698