Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 _DEFAULT_JSON_FILENAME = 'PerformanceTestsResults.json' | 56 _DEFAULT_JSON_FILENAME = 'PerformanceTestsResults.json' |
| 57 | 57 |
| 58 def __init__(self, args=None, port=None): | 58 def __init__(self, args=None, port=None): |
| 59 self._options, self._args = PerfTestsRunner._parse_args(args) | 59 self._options, self._args = PerfTestsRunner._parse_args(args) |
| 60 if port: | 60 if port: |
| 61 self._port = port | 61 self._port = port |
| 62 self._host = self._port.host | 62 self._host = self._port.host |
| 63 else: | 63 else: |
| 64 self._host = Host() | 64 self._host = Host() |
| 65 self._port = self._host.port_factory.get(self._options.platform, sel f._options) | 65 self._port = self._host.port_factory.get(self._options.platform, sel f._options) |
| 66 self._webkit_base_dir_len = len(self._port.webkit_base()) | |
|
tkent
2017/05/09 01:19:50
_webkit_base_dir_len isn't used.
qyearsley
2017/05/09 21:46:28
Excellent :-)
| |
| 67 self._base_path = self._port.perf_tests_dir() | 66 self._base_path = self._port.perf_tests_dir() |
| 68 self._timestamp = time.time() | 67 self._timestamp = time.time() |
| 69 self._utc_timestamp = datetime.datetime.utcnow() | 68 self._utc_timestamp = datetime.datetime.utcnow() |
| 70 | 69 |
| 71 @staticmethod | 70 @staticmethod |
| 72 def _parse_args(args=None): | 71 def _parse_args(args=None): |
| 73 def _expand_path(option, opt_str, value, parser): | 72 def _expand_path(option, opt_str, value, parser): |
| 74 path = os.path.expandvars(os.path.expanduser(value)) | 73 path = os.path.expandvars(os.path.expanduser(value)) |
| 75 setattr(parser.values, option.dest, path) | 74 setattr(parser.values, option.dest, path) |
| 76 perf_option_list = [ | 75 perf_option_list = [ |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 371 if metrics: | 370 if metrics: |
| 372 self._results.append((test, metrics)) | 371 self._results.append((test, metrics)) |
| 373 else: | 372 else: |
| 374 failures += 1 | 373 failures += 1 |
| 375 _log.error('FAILED') | 374 _log.error('FAILED') |
| 376 | 375 |
| 377 _log.info('Finished: %f s', time.time() - start_time) | 376 _log.info('Finished: %f s', time.time() - start_time) |
| 378 _log.info('') | 377 _log.info('') |
| 379 | 378 |
| 380 return failures | 379 return failures |
| OLD | NEW |