| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 results = RunCmd(['svn', 'st', '-u']) | 128 results = RunCmd(['svn', 'st', '-u']) |
| 129 for line in results: | 129 for line in results: |
| 130 if '*' in line: | 130 if '*' in line: |
| 131 return True | 131 return True |
| 132 return False | 132 return False |
| 133 | 133 |
| 134 def GetBrowsers(): | 134 def GetBrowsers(): |
| 135 if not PERFBOT_MODE: | 135 if not PERFBOT_MODE: |
| 136 # Only Firefox (and Chrome, but we have Dump Render Tree) works in Linux | 136 # Only Firefox (and Chrome, but we have Dump Render Tree) works in Linux |
| 137 return ['ff'] | 137 return ['ff'] |
| 138 browsers = ['ff', 'chrome'] | 138 browsers = ['ff', 'chrome', 'safari'] |
| 139 if platform.system() == 'Windows': | 139 if platform.system() == 'Windows': |
| 140 browsers += ['ie'] | 140 browsers += ['ie'] |
| 141 return browsers | 141 return browsers |
| 142 | 142 |
| 143 def GetVersions(): | 143 def GetVersions(): |
| 144 if not PERFBOT_MODE: | 144 if not PERFBOT_MODE: |
| 145 return [FROG] | 145 return [FROG] |
| 146 else: | 146 else: |
| 147 return V8_AND_FROG | 147 return V8_AND_FROG |
| 148 | 148 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 173 performance results will be stored. | 173 performance results will be stored. |
| 174 platform_list a list containing the platform(s) that our data has been | 174 platform_list a list containing the platform(s) that our data has been |
| 175 run on. (command line, firefox, chrome, etc) | 175 run on. (command line, firefox, chrome, etc) |
| 176 v8_and_or_frog_list a list specifying whether we hold data about Frog | 176 v8_and_or_frog_list a list specifying whether we hold data about Frog |
| 177 generated code, plain JS code (v8), or a combination of both. | 177 generated code, plain JS code (v8), or a combination of both. |
| 178 values_list a list containing the type of data we will be graphing | 178 values_list a list containing the type of data we will be graphing |
| 179 (benchmarks, percentage passing, etc)""" | 179 (benchmarks, percentage passing, etc)""" |
| 180 self.result_folder_name = result_folder_name | 180 self.result_folder_name = result_folder_name |
| 181 # cur_time is used as a timestamp of when this performance test was run. | 181 # cur_time is used as a timestamp of when this performance test was run. |
| 182 self.cur_time = str(time.mktime(datetime.datetime.now().timetuple())) | 182 self.cur_time = str(time.mktime(datetime.datetime.now().timetuple())) |
| 183 self.browser_color = {'chrome': 'green', 'ie': 'blue', 'ff': 'red'} | 183 self.browser_color = {'chrome': 'green', 'ie': 'blue', 'ff': 'red', |
| 184 'safari':'black'} |
| 184 self.values_list = values_list | 185 self.values_list = values_list |
| 185 self.platform_list = platform_list | 186 self.platform_list = platform_list |
| 186 self.revision_dict = dict() | 187 self.revision_dict = dict() |
| 187 self.values_dict = dict() | 188 self.values_dict = dict() |
| 188 self.color_index = 0 | 189 self.color_index = 0 |
| 189 for platform in platform_list: | 190 for platform in platform_list: |
| 190 self.revision_dict[platform] = dict() | 191 self.revision_dict[platform] = dict() |
| 191 self.values_dict[platform] = dict() | 192 self.values_dict[platform] = dict() |
| 192 for f in v8_and_or_frog_list: | 193 for f in v8_and_or_frog_list: |
| 193 self.revision_dict[platform][f] = dict() | 194 self.revision_dict[platform][f] = dict() |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 parser.add_option('--language', '-l', dest = 'language', | 690 parser.add_option('--language', '-l', dest = 'language', |
| 690 help = 'Run the language correctness tests', | 691 help = 'Run the language correctness tests', |
| 691 action = 'store_true', default = False) | 692 action = 'store_true', default = False) |
| 692 parser.add_option('--browser-perf', '-b', dest = 'perf', | 693 parser.add_option('--browser-perf', '-b', dest = 'perf', |
| 693 help = 'Run the browser performance tests', | 694 help = 'Run the browser performance tests', |
| 694 action = 'store_true', default = False) | 695 action = 'store_true', default = False) |
| 695 parser.add_option('--forever', '-f', dest = 'continuous', | 696 parser.add_option('--forever', '-f', dest = 'continuous', |
| 696 help = 'Run this script forever, always checking for the next svn ' | 697 help = 'Run this script forever, always checking for the next svn ' |
| 697 'checkin', action = 'store_true', default = False) | 698 'checkin', action = 'store_true', default = False) |
| 698 parser.add_option('--perfbot', '-p', dest = 'perfbot', | 699 parser.add_option('--perfbot', '-p', dest = 'perfbot', |
| 699 help = "Run in perfbot mode. (Generate plots, and remove trace files)", | 700 help = "Run in perfbot mode. (Generate plots, and keep trace files)", |
| 700 action = 'store_true', default = False) | 701 action = 'store_true', default = False) |
| 701 parser.add_option('--verbose', '-v', dest = 'verbose', | 702 parser.add_option('--verbose', '-v', dest = 'verbose', |
| 702 help = 'Print extra debug output', action = 'store_true', default = False) | 703 help = 'Print extra debug output', action = 'store_true', default = False) |
| 703 | 704 |
| 704 args, ignored = parser.parse_args() | 705 args, ignored = parser.parse_args() |
| 705 if not (args.cl or args.size or args.language or args.perf): | 706 if not (args.cl or args.size or args.language or args.perf): |
| 706 args.cl = args.size = args.language = args.perf = True | 707 args.cl = args.size = args.language = args.perf = True |
| 707 return (args.cl, args.size, args.language, args.perf, args.continuous, | 708 return (args.cl, args.size, args.language, args.perf, args.continuous, |
| 708 args.perfbot, args.verbose) | 709 args.perfbot, args.verbose) |
| 709 | 710 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 735 if HasNewCode(): | 736 if HasNewCode(): |
| 736 RunTestSequence(cl, size, language, perf) | 737 RunTestSequence(cl, size, language, perf) |
| 737 else: | 738 else: |
| 738 time.sleep(SLEEP_TIME) | 739 time.sleep(SLEEP_TIME) |
| 739 else: | 740 else: |
| 740 RunTestSequence(cl, size, language, perf) | 741 RunTestSequence(cl, size, language, perf) |
| 741 | 742 |
| 742 if __name__ == '__main__': | 743 if __name__ == '__main__': |
| 743 main() | 744 main() |
| 744 | 745 |
| OLD | NEW |