| 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 math | 8 import math |
| 9 try: | 9 try: |
| 10 from matplotlib.font_manager import FontProperties | 10 from matplotlib.font_manager import FontProperties |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 self.trace_file = os.path.join('..', 'tools', 'testing', 'perf_testing', | 599 self.trace_file = os.path.join('..', 'tools', 'testing', 'perf_testing', |
| 600 self.result_folder_name, self.result_folder_name + self.cur_time) | 600 self.result_folder_name, self.result_folder_name + self.cur_time) |
| 601 | 601 |
| 602 self.AddSvnRevisionToTrace(self.trace_file) | 602 self.AddSvnRevisionToTrace(self.trace_file) |
| 603 | 603 |
| 604 elapsed = TimeCmd([os.path.join('.', 'frog.py'), '--', | 604 elapsed = TimeCmd([os.path.join('.', 'frog.py'), '--', |
| 605 '--out=minfrog', 'minfrog.dart']) | 605 '--out=minfrog', 'minfrog.dart']) |
| 606 RunCmd(['echo', '%f Compiling on Dart VM in production mode in seconds' | 606 RunCmd(['echo', '%f Compiling on Dart VM in production mode in seconds' |
| 607 % elapsed], self.trace_file, append=True) | 607 % elapsed], self.trace_file, append=True) |
| 608 elapsed = TimeCmd([os.path.join('.', 'minfrog'), '--out=minfrog', | 608 elapsed = TimeCmd([os.path.join('.', 'minfrog'), '--out=minfrog', |
| 609 '--warnings_as_errors', 'minfrog.dart', os.path.join('tests', | 609 'minfrog.dart', os.path.join('tests', 'hello.dart')]) |
| 610 'hello.dart')]) | |
| 611 if elapsed < self.failure_threshold['Bootstrapping']: | 610 if elapsed < self.failure_threshold['Bootstrapping']: |
| 612 #minfrog didn't compile correctly. Stop testing now, because subsequent | 611 #minfrog didn't compile correctly. Stop testing now, because subsequent |
| 613 #numbers will be meaningless. | 612 #numbers will be meaningless. |
| 614 return | 613 return |
| 615 size = os.path.getsize('minfrog') | 614 size = os.path.getsize('minfrog') |
| 616 RunCmd(['echo', '%f Bootstrapping time in seconds in production mode' % | 615 RunCmd(['echo', '%f Bootstrapping time in seconds in production mode' % |
| 617 elapsed], self.trace_file, append=True) | 616 elapsed], self.trace_file, append=True) |
| 618 RunCmd(['echo', '%d Generated checked minfrog size' % size], | 617 RunCmd(['echo', '%d Generated checked minfrog size' % size], |
| 619 self.trace_file, append=True) | 618 self.trace_file, append=True) |
| 620 | 619 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 if HasNewCode(): | 750 if HasNewCode(): |
| 752 RunTestSequence(cl, size, language, perf) | 751 RunTestSequence(cl, size, language, perf) |
| 753 else: | 752 else: |
| 754 time.sleep(SLEEP_TIME) | 753 time.sleep(SLEEP_TIME) |
| 755 else: | 754 else: |
| 756 RunTestSequence(cl, size, language, perf) | 755 RunTestSequence(cl, size, language, perf) |
| 757 | 756 |
| 758 if __name__ == '__main__': | 757 if __name__ == '__main__': |
| 759 main() | 758 main() |
| 760 | 759 |
| OLD | NEW |