OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Script to generate chromium.perf.json and chromium.perf.fyi.json in | 6 """Script to generate chromium.perf.json and chromium.perf.fyi.json in |
7 the src/testing/buildbot directory and benchmark.csv in the src/tools/perf | 7 the src/testing/buildbot directory and benchmark.csv in the src/tools/perf |
8 directory. Maintaining these files by hand is too unwieldy. | 8 directory. Maintaining these files by hand is too unwieldy. |
9 """ | 9 """ |
10 import argparse | 10 import argparse |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 } | 182 } |
183 ]) | 183 ]) |
184 waterfall = add_tester( | 184 waterfall = add_tester( |
185 waterfall, 'Android Swarming N5X Tester', | 185 waterfall, 'Android Swarming N5X Tester', |
186 'fyi-android-swarming-n5x', 'android', | 186 'fyi-android-swarming-n5x', 'android', |
187 swarming=[ | 187 swarming=[ |
188 { | 188 { |
189 'os': 'Android', | 189 'os': 'Android', |
190 'android_devices': '1', | 190 'android_devices': '1', |
191 'device_ids': [ | 191 'device_ids': [ |
192 #'build245-m4--device1', offline, see http://crbug.com/705135 | 192 'build245-m4--device1', 'build245-m4--device2', |
193 'build245-m4--device2', | |
194 'build245-m4--device3', 'build245-m4--device4', | 193 'build245-m4--device3', 'build245-m4--device4', |
195 'build245-m4--device5', 'build245-m4--device6', | 194 'build245-m4--device5', 'build245-m4--device6', |
196 'build245-m4--device7', 'build248-m4--device1', | 195 'build245-m4--device7', 'build248-m4--device1', |
197 'build248-m4--device2', 'build248-m4--device3', | 196 'build248-m4--device2', 'build248-m4--device3', |
198 'build248-m4--device4', 'build248-m4--device5', | 197 'build248-m4--device4', 'build248-m4--device5', |
199 'build248-m4--device6', 'build248-m4--device7', | 198 'build248-m4--device6', 'build248-m4--device7', |
200 'build249-m4--device1', 'build249-m4--device2', | 199 'build249-m4--device1', 'build249-m4--device2', |
201 'build249-m4--device3', 'build249-m4--device4', | 200 'build249-m4--device3', 'build249-m4--device4', |
202 'build249-m4--device5', 'build249-m4--device6', | 201 'build249-m4--device5', 'build249-m4--device6', |
203 'build249-m4--device7' | 202 'build249-m4--device7' |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 | 753 |
755 all_benchmarks = current_benchmarks(False) | 754 all_benchmarks = current_benchmarks(False) |
756 whitelist_benchmarks = current_benchmarks(True) | 755 whitelist_benchmarks = current_benchmarks(True) |
757 # Get benchmark sharding according to common sharding configurations | 756 # Get benchmark sharding according to common sharding configurations |
758 # Currently we only have bots sharded 5 directions and 1 direction | 757 # Currently we only have bots sharded 5 directions and 1 direction |
759 benchmark_sharding_map = {} | 758 benchmark_sharding_map = {} |
760 benchmark_sharding_map['22'] = shard_benchmarks(22, all_benchmarks) | 759 benchmark_sharding_map['22'] = shard_benchmarks(22, all_benchmarks) |
761 benchmark_sharding_map['5'] = shard_benchmarks(5, all_benchmarks) | 760 benchmark_sharding_map['5'] = shard_benchmarks(5, all_benchmarks) |
762 benchmark_sharding_map['1'] = shard_benchmarks(1, all_benchmarks) | 761 benchmark_sharding_map['1'] = shard_benchmarks(1, all_benchmarks) |
763 benchmark_sharding_map['21'] = shard_benchmarks(21, all_benchmarks) | 762 benchmark_sharding_map['21'] = shard_benchmarks(21, all_benchmarks) |
764 # Added because of temporary removal of device in http://crbug.com/705135 | |
765 benchmark_sharding_map['20'] = shard_benchmarks(20, all_benchmarks) | |
766 | 763 |
767 for name, config in waterfall['testers'].iteritems(): | 764 for name, config in waterfall['testers'].iteritems(): |
768 use_whitelist = config['use_whitelist'] | 765 use_whitelist = config['use_whitelist'] |
769 benchmark_list = all_benchmarks | 766 benchmark_list = all_benchmarks |
770 if use_whitelist: | 767 if use_whitelist: |
771 benchmark_list = whitelist_benchmarks | 768 benchmark_list = whitelist_benchmarks |
772 if config.get('swarming', False): | 769 if config.get('swarming', False): |
773 # Our current configuration only ever has one set of swarming dimensions | 770 # Our current configuration only ever has one set of swarming dimensions |
774 # Make sure this still holds true | 771 # Make sure this still holds true |
775 if len(config['swarming_dimensions']) > 1: | 772 if len(config['swarming_dimensions']) > 1: |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 return 0 | 975 return 0 |
979 else: | 976 else: |
980 print ('The perf JSON config files are not up-to-date. Please run %s ' | 977 print ('The perf JSON config files are not up-to-date. Please run %s ' |
981 'without --validate-only flag to update the perf JSON ' | 978 'without --validate-only flag to update the perf JSON ' |
982 'configs and benchmark.csv.') % sys.argv[0] | 979 'configs and benchmark.csv.') % sys.argv[0] |
983 return 1 | 980 return 1 |
984 else: | 981 else: |
985 update_all_tests([fyi_waterfall, waterfall]) | 982 update_all_tests([fyi_waterfall, waterfall]) |
986 update_benchmark_csv() | 983 update_benchmark_csv() |
987 return 0 | 984 return 0 |
OLD | NEW |