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: telemetry/telemetry/internal/story_runner.py

Issue 2453073002: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor (Closed)
Patch Set: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor Created 4 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
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 sys 8 import sys
9 import time 9 import time
10 10
11 import py_utils
11 from py_utils import cloud_storage # pylint: disable=import-error 12 from py_utils import cloud_storage # pylint: disable=import-error
12 13
13 from telemetry.core import exceptions 14 from telemetry.core import exceptions
14 from telemetry import decorators 15 from telemetry import decorators
15 from telemetry.internal.actions import page_action 16 from telemetry.internal.actions import page_action
16 from telemetry.internal.browser import browser_finder 17 from telemetry.internal.browser import browser_finder
17 from telemetry.internal.results import results_options 18 from telemetry.internal.results import results_options
18 from telemetry.internal.util import exception_formatter 19 from telemetry.internal.util import exception_formatter
19 from telemetry import page 20 from telemetry import page
20 from telemetry.page import legacy_page_test 21 from telemetry.page import legacy_page_test
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if not state.CanRunStory(story): 81 if not state.CanRunStory(story):
81 results.AddValue(skip.SkipValue( 82 results.AddValue(skip.SkipValue(
82 story, 83 story,
83 'Skipped because story is not supported ' 84 'Skipped because story is not supported '
84 '(SharedState.CanRunStory() returns False).')) 85 '(SharedState.CanRunStory() returns False).'))
85 return 86 return
86 state.RunStory(results) 87 state.RunStory(results)
87 if isinstance(test, story_test.StoryTest): 88 if isinstance(test, story_test.StoryTest):
88 test.Measure(state.platform, results) 89 test.Measure(state.platform, results)
89 except (legacy_page_test.Failure, exceptions.TimeoutException, 90 except (legacy_page_test.Failure, exceptions.TimeoutException,
90 exceptions.LoginException, exceptions.ProfilingException): 91 exceptions.LoginException, exceptions.ProfilingException,
92 py_utils.TimeoutException):
91 ProcessError() 93 ProcessError()
92 except exceptions.Error: 94 except exceptions.Error:
93 ProcessError() 95 ProcessError()
94 raise 96 raise
95 except page_action.PageActionNotSupported as e: 97 except page_action.PageActionNotSupported as e:
96 results.AddValue( 98 results.AddValue(
97 skip.SkipValue(story, 'Unsupported page action: %s' % e)) 99 skip.SkipValue(story, 'Unsupported page action: %s' % e))
98 except Exception: 100 except Exception:
99 ProcessError(description='Unhandlable exception raised.') 101 ProcessError(description='Unhandlable exception raised.')
100 raise 102 raise
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 logging.warning('Device is thermally throttled before running ' 435 logging.warning('Device is thermally throttled before running '
434 'performance tests, results will vary.') 436 'performance tests, results will vary.')
435 437
436 438
437 def _CheckThermalThrottling(platform): 439 def _CheckThermalThrottling(platform):
438 if not platform.CanMonitorThermalThrottling(): 440 if not platform.CanMonitorThermalThrottling():
439 return 441 return
440 if platform.HasBeenThermallyThrottled(): 442 if platform.HasBeenThermallyThrottled():
441 logging.warning('Device has been thermally throttled during ' 443 logging.warning('Device has been thermally throttled during '
442 'performance tests, results will vary.') 444 'performance tests, results will vary.')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698