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

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

Issue 205243003: [telemetry] Consolidate global hooks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « tools/telemetry/telemetry/interactive_debugging.py ('k') | tools/telemetry/telemetry/test.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 (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 import collections 5 import collections
6 import copy 6 import copy
7 import glob 7 import glob
8 import logging 8 import logging
9 import os 9 import os
10 import random 10 import random
11 import sys 11 import sys
12 import tempfile 12 import tempfile
13 import time 13 import time
14 import traceback 14 import traceback
15 15
16 from telemetry import decorators 16 from telemetry import decorators
17 from telemetry import exception_formatter
18 from telemetry.core import browser_finder 17 from telemetry.core import browser_finder
19 from telemetry.core import exceptions 18 from telemetry.core import exceptions
20 from telemetry.core import util 19 from telemetry.core import util
21 from telemetry.core import wpr_modes 20 from telemetry.core import wpr_modes
22 from telemetry.core.platform.profiler import profiler_finder 21 from telemetry.core.platform.profiler import profiler_finder
23 from telemetry.page import page_filter 22 from telemetry.page import page_filter
24 from telemetry.page import page_runner_repeat 23 from telemetry.page import page_runner_repeat
25 from telemetry.page import page_test 24 from telemetry.page import page_test
26 from telemetry.page import results_options 25 from telemetry.page import results_options
27 from telemetry.page.actions import navigate 26 from telemetry.page.actions import navigate
28 from telemetry.page.actions import page_action 27 from telemetry.page.actions import page_action
28 from telemetry.util import exception_formatter
29 29
30 30
31 class _RunState(object): 31 class _RunState(object):
32 def __init__(self): 32 def __init__(self):
33 self.browser = None 33 self.browser = None
34 34
35 self._append_to_existing_wpr = False 35 self._append_to_existing_wpr = False
36 self._last_archive_path = None 36 self._last_archive_path = None
37 self._first_browser = True 37 self._first_browser = True
38 self.first_page = collections.defaultdict(lambda: True) 38 self.first_page = collections.defaultdict(lambda: True)
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 logging.error('Device is thermally throttled before running ' 534 logging.error('Device is thermally throttled before running '
535 'performance tests, results will vary.') 535 'performance tests, results will vary.')
536 536
537 537
538 def _CheckThermalThrottling(platform): 538 def _CheckThermalThrottling(platform):
539 if not platform.CanMonitorThermalThrottling(): 539 if not platform.CanMonitorThermalThrottling():
540 return 540 return
541 if platform.HasBeenThermallyThrottled(): 541 if platform.HasBeenThermallyThrottled():
542 logging.error('Device has been thermally throttled during ' 542 logging.error('Device has been thermally throttled during '
543 'performance tests, results will vary.') 543 'performance tests, results will vary.')
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/interactive_debugging.py ('k') | tools/telemetry/telemetry/test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698