Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 import datetime | 7 import datetime |
| 8 import getpass | 8 import getpass |
| 9 import math | 9 import math |
| 10 try: | 10 try: |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 276 for name in self.suite_names: | 276 for name in self.suite_names: |
| 277 suites += [TestBuilder.make_test(name, self)] | 277 suites += [TestBuilder.make_test(name, self)] |
| 278 | 278 |
| 279 if not self.no_build and self.sync_and_build(suites) == 1: | 279 if not self.no_build and self.sync_and_build(suites) == 1: |
| 280 return # The build is broken. | 280 return # The build is broken. |
| 281 | 281 |
| 282 for test in suites: | 282 for test in suites: |
| 283 test.run(self.graph_only) | 283 test.run(self.graph_only) |
| 284 | 284 |
| 285 if self.upload: | 285 if self.upload: |
| 286 self.upload_to_app_engine(TestBuilder.available_site_names()) | 286 self.upload_to_app_engine(TestBuilder.available_suite_names()) |
| 287 | 287 |
| 288 | 288 |
| 289 class Test(object): | 289 class Test(object): |
| 290 """The base class to provide shared code for different tests we will run and | 290 """The base class to provide shared code for different tests we will run and |
| 291 graph. At a high level, each test has three visitors (the tester, the | 291 graph. At a high level, each test has three visitors (the tester, the |
| 292 file_processor, and the grapher) that perform operations on the test | 292 file_processor, and the grapher) that perform operations on the test |
| 293 object.""" | 293 object.""" |
| 294 | 294 |
| 295 def __init__(self, result_folder_name, platform_list, variants, | 295 def __init__(self, result_folder_name, platform_list, variants, |
| 296 values_list, test_runner, tester, file_processor, grapher, | 296 values_list, test_runner, tester, file_processor, grapher, |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 561 ('Geometric Mean of benchmark %s performance on %s ' % | 561 ('Geometric Mean of benchmark %s performance on %s ' % |
| 562 (self.test.platform_type, utils.GuessOS()), 'Speed (bigger = better)', | 562 (self.test.platform_type, utils.GuessOS()), 'Speed (bigger = better)', |
| 563 16, 5, 'lower left', 'avg'+png_filename) | 563 16, 5, 'lower left', 'avg'+png_filename) |
| 564 clear_axis = True | 564 clear_axis = True |
| 565 for platform in self.test.platform_list: | 565 for platform in self.test.platform_list: |
| 566 for version in self.test.versions: | 566 for version in self.test.versions: |
| 567 for metric in self.test.extra_metrics: | 567 for metric in self.test.extra_metrics: |
| 568 self.style_and_save_perf_plot(title, y_axis, size_x, size_y, loc, | 568 self.style_and_save_perf_plot(title, y_axis, size_x, size_y, loc, |
| 569 filename, [platform], [version], | 569 filename, [platform], [version], |
| 570 [metric], clear_axis) | 570 [metric], clear_axis) |
| 571 clear_axis = False | |
|
Emily Fortuna
2012/04/12 20:01:00
This line got deleted when I was refactoring. Now
| |
| 571 | 572 |
| 572 def plot_results(self, png_filename): | 573 def plot_results(self, png_filename): |
| 573 self.plot_all_perf(png_filename) | 574 self.plot_all_perf(png_filename) |
| 574 self.plot_avg_perf('2' + png_filename) | 575 self.plot_avg_perf('2' + png_filename) |
| 575 | 576 |
| 576 | 577 |
| 577 class CommonCommandLineTest(RuntimePerformanceTest): | 578 class CommonCommandLineTest(RuntimePerformanceTest): |
| 578 """Run the basic performance tests (Benchpress, some V8 benchmarks) from the | 579 """Run the basic performance tests (Benchpress, some V8 benchmarks) from the |
| 579 command line.""" | 580 command line.""" |
| 580 | 581 |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1218 while True: | 1219 while True: |
| 1219 if runner.has_new_code(): | 1220 if runner.has_new_code(): |
| 1220 runner.run_test_sequence() | 1221 runner.run_test_sequence() |
| 1221 else: | 1222 else: |
| 1222 time.sleep(200) | 1223 time.sleep(200) |
| 1223 else: | 1224 else: |
| 1224 runner.run_test_sequence() | 1225 runner.run_test_sequence() |
| 1225 | 1226 |
| 1226 if __name__ == '__main__': | 1227 if __name__ == '__main__': |
| 1227 main() | 1228 main() |
| OLD | NEW |