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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftest.py

Issue 1846093002: Revert of Remove unused imports in webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 # Copyright (C) 2012 Google Inc. All rights reserved. 1 # Copyright (C) 2012 Google Inc. All rights reserved.
2 # Copyright (C) 2012 Zoltan Horvath, Adobe Systems Incorporated. All rights rese rved. 2 # Copyright (C) 2012 Zoltan Horvath, Adobe Systems Incorporated. All rights rese rved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 29
30 30
31 import errno
31 import logging 32 import logging
32 import math 33 import math
33 import re 34 import re
35 import os
36 import signal
37 import socket
38 import subprocess
39 import sys
40 import time
34 41
42 from webkitpy.layout_tests.controllers.test_result_writer import TestResultWrite r
35 from webkitpy.layout_tests.port.driver import DriverInput 43 from webkitpy.layout_tests.port.driver import DriverInput
44 from webkitpy.layout_tests.port.driver import DriverOutput
36 45
37 DEFAULT_TEST_RUNNER_COUNT = 4 46 DEFAULT_TEST_RUNNER_COUNT = 4
38 47
39 _log = logging.getLogger(__name__) 48 _log = logging.getLogger(__name__)
40 49
41 50
42 class PerfTestMetric(object): 51 class PerfTestMetric(object):
43 def __init__(self, metric, unit=None, iterations=None): 52 def __init__(self, metric, unit=None, iterations=None):
44 # FIXME: Fix runner.js to report correct metric names 53 # FIXME: Fix runner.js to report correct metric names
45 self._iterations = iterations or [] 54 self._iterations = iterations or []
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 (re.compile(r'^Dromaeo/'), SingleProcessPerfTest), 309 (re.compile(r'^Dromaeo/'), SingleProcessPerfTest),
301 (re.compile(r'^inspector/'), ChromiumStylePerfTest), 310 (re.compile(r'^inspector/'), ChromiumStylePerfTest),
302 ] 311 ]
303 312
304 @classmethod 313 @classmethod
305 def create_perf_test(cls, port, test_name, path, test_runner_count=DEFAULT_T EST_RUNNER_COUNT): 314 def create_perf_test(cls, port, test_name, path, test_runner_count=DEFAULT_T EST_RUNNER_COUNT):
306 for (pattern, test_class) in cls._pattern_map: 315 for (pattern, test_class) in cls._pattern_map:
307 if pattern.match(test_name): 316 if pattern.match(test_name):
308 return test_class(port, test_name, path, test_runner_count) 317 return test_class(port, test_name, path, test_runner_count)
309 return PerfTest(port, test_name, path, test_runner_count) 318 return PerfTest(port, test_name, path, test_runner_count)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698