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

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

Issue 2206913003: Remove webkitpy/common/config/urls.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/common/config/urls.py ('k') | no next file » | 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 Google Inc. All rights reserved. 1 # Copyright (C) 2012 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 19 matching lines...) Expand all
30 30
31 import os 31 import os
32 import json 32 import json
33 import logging 33 import logging
34 import optparse 34 import optparse
35 import time 35 import time
36 import datetime 36 import datetime
37 37
38 from webkitpy.common import find_files 38 from webkitpy.common import find_files
39 from webkitpy.common.checkout.scm.detection import SCMDetector 39 from webkitpy.common.checkout.scm.detection import SCMDetector
40 from webkitpy.common.config.urls import view_source_url
41 from webkitpy.common.host import Host 40 from webkitpy.common.host import Host
42 from webkitpy.common.net.file_uploader import FileUploader 41 from webkitpy.common.net.file_uploader import FileUploader
43 from webkitpy.performance_tests.perftest import PerfTestFactory 42 from webkitpy.performance_tests.perftest import PerfTestFactory
44 from webkitpy.performance_tests.perftest import DEFAULT_TEST_RUNNER_COUNT 43 from webkitpy.performance_tests.perftest import DEFAULT_TEST_RUNNER_COUNT
45 44
46 45
47 _log = logging.getLogger(__name__) 46 _log = logging.getLogger(__name__)
48 47
49 48
50 class PerfTestsRunner(object): 49 class PerfTestsRunner(object):
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 286
288 for test, metrics in self._results: 287 for test, metrics in self._results:
289 for metric_name, iteration_values in metrics.iteritems(): 288 for metric_name, iteration_values in metrics.iteritems():
290 if not isinstance(iteration_values, list): # We can't reports r esults without individual measurements. 289 if not isinstance(iteration_values, list): # We can't reports r esults without individual measurements.
291 continue 290 continue
292 291
293 tests = contents['tests'] 292 tests = contents['tests']
294 path = test.test_name_without_file_extension().split('/') 293 path = test.test_name_without_file_extension().split('/')
295 for i in range(0, len(path)): 294 for i in range(0, len(path)):
296 is_last_token = i + 1 == len(path) 295 is_last_token = i + 1 == len(path)
297 url = view_source_url('PerformanceTests/' + (test.test_name( ) if is_last_token else '/'.join(path[0:i + 1]))) 296 url = self.view_source_url(
297 'PerformanceTests/' + (test.test_name() if is_last_token else '/'.join(path[0:i + 1])))
298 tests.setdefault(path[i], {'url': url}) 298 tests.setdefault(path[i], {'url': url})
299 current_test = tests[path[i]] 299 current_test = tests[path[i]]
300 if is_last_token: 300 if is_last_token:
301 current_test.setdefault('metrics', {}) 301 current_test.setdefault('metrics', {})
302 assert metric_name not in current_test['metrics'] 302 assert metric_name not in current_test['metrics']
303 current_test['metrics'][metric_name] = {'current': itera tion_values} 303 current_test['metrics'][metric_name] = {'current': itera tion_values}
304 else: 304 else:
305 current_test.setdefault('tests', {}) 305 current_test.setdefault('tests', {})
306 tests = current_test['tests'] 306 tests = current_test['tests']
307 307
308 return contents 308 return contents
309 309
310 @staticmethod 310 @staticmethod
311 def view_source_url(path_from_blink):
312 return "https://src.chromium.org/viewvc/blink/trunk/%s" % path_from_blin k
qyearsley 2016/08/03 18:13:53 Also, it seems likely that this should be updated
Dirk Pranke 2016/08/09 00:05:15 whichever you like. I'd probably do it in this CL.
qyearsley 2016/08/09 17:22:10 Done
313
314 @staticmethod
311 def _datetime_in_ES5_compatible_iso_format(datetime): 315 def _datetime_in_ES5_compatible_iso_format(datetime):
312 return datetime.strftime('%Y-%m-%dT%H:%M:%S.%f') 316 return datetime.strftime('%Y-%m-%dT%H:%M:%S.%f')
313 317
314 def _merge_slave_config_json(self, slave_config_json_path, contents): 318 def _merge_slave_config_json(self, slave_config_json_path, contents):
315 if not self._host.filesystem.isfile(slave_config_json_path): 319 if not self._host.filesystem.isfile(slave_config_json_path):
316 _log.error("Missing slave configuration JSON file: %s", slave_config _json_path) 320 _log.error("Missing slave configuration JSON file: %s", slave_config _json_path)
317 return None 321 return None
318 322
319 try: 323 try:
320 slave_config_json = self._host.filesystem.open_text_file_for_reading (slave_config_json_path) 324 slave_config_json = self._host.filesystem.open_text_file_for_reading (slave_config_json_path)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 if metrics: 377 if metrics:
374 self._results.append((test, metrics)) 378 self._results.append((test, metrics))
375 else: 379 else:
376 failures += 1 380 failures += 1
377 _log.error('FAILED') 381 _log.error('FAILED')
378 382
379 _log.info('Finished: %f s', time.time() - start_time) 383 _log.info('Finished: %f s', time.time() - start_time)
380 _log.info('') 384 _log.info('')
381 385
382 return failures 386 return failures
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/common/config/urls.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698