| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 254 |
| 255 absolute_path_to_trunk = filesystem.dirname(self._port.perf_tests_dir()) | 255 absolute_path_to_trunk = filesystem.dirname(self._port.perf_tests_dir()) |
| 256 results_page = template.replace('%AbsolutePathToWebKitTrunk%', absolute_
path_to_trunk) | 256 results_page = template.replace('%AbsolutePathToWebKitTrunk%', absolute_
path_to_trunk) |
| 257 results_page = results_page.replace('%PeformanceTestsResultsJSON%', json
_output) | 257 results_page = results_page.replace('%PeformanceTestsResultsJSON%', json
_output) |
| 258 | 258 |
| 259 filesystem.write_text_file(self._results_page_path(), results_page) | 259 filesystem.write_text_file(self._results_page_path(), results_page) |
| 260 | 260 |
| 261 def _generate_results_dict(self, timestamp, description, platform, builder_n
ame, build_number): | 261 def _generate_results_dict(self, timestamp, description, platform, builder_n
ame, build_number): |
| 262 revisions = {} | 262 revisions = {} |
| 263 path = self._port.repository_path() | 263 path = self._port.repository_path() |
| 264 git = self._host.scm(path=path) | 264 git = self._host.git(path=path) |
| 265 revision = str(git.commit_position(path)) | 265 revision = str(git.commit_position(path)) |
| 266 revisions['chromium'] = {'revision': revision, 'timestamp': git.timestam
p_of_revision(path, revision)} | 266 revisions['chromium'] = {'revision': revision, 'timestamp': git.timestam
p_of_revision(path, revision)} |
| 267 | 267 |
| 268 meta_info = { | 268 meta_info = { |
| 269 'description': description, | 269 'description': description, |
| 270 'buildTime': self._datetime_in_ES5_compatible_iso_format(self._utc_t
imestamp), | 270 'buildTime': self._datetime_in_ES5_compatible_iso_format(self._utc_t
imestamp), |
| 271 'platform': platform, | 271 'platform': platform, |
| 272 'revisions': revisions, | 272 'revisions': revisions, |
| 273 'builderName': builder_name, | 273 'builderName': builder_name, |
| 274 'buildNumber': int(build_number) if build_number else None} | 274 'buildNumber': int(build_number) if build_number else None} |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 if metrics: | 371 if metrics: |
| 372 self._results.append((test, metrics)) | 372 self._results.append((test, metrics)) |
| 373 else: | 373 else: |
| 374 failures += 1 | 374 failures += 1 |
| 375 _log.error('FAILED') | 375 _log.error('FAILED') |
| 376 | 376 |
| 377 _log.info('Finished: %f s', time.time() - start_time) | 377 _log.info('Finished: %f s', time.time() - start_time) |
| 378 _log.info('') | 378 _log.info('') |
| 379 | 379 |
| 380 return failures | 380 return failures |
| OLD | NEW |