OLD | NEW |
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 Loading... |
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.') |
OLD | NEW |