| 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. Maintaining these files by hand is | 7 the src/testing/buildbot directory. Maintaining these files by hand is |
| 8 too unwieldy. | 8 too unwieldy. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 'chromium-rel-win7-gpu-intel', 'win', num_host_shards=5) | 311 'chromium-rel-win7-gpu-intel', 'win', num_host_shards=5) |
| 312 waterfall = add_tester( | 312 waterfall = add_tester( |
| 313 waterfall, 'Win 7 Nvidia GPU Perf', | 313 waterfall, 'Win 7 Nvidia GPU Perf', |
| 314 'chromium-rel-win7-gpu-nvidia', 'win', num_host_shards=5) | 314 'chromium-rel-win7-gpu-nvidia', 'win', num_host_shards=5) |
| 315 | 315 |
| 316 waterfall = add_tester( | 316 waterfall = add_tester( |
| 317 waterfall, 'Mac 10.11 Perf', 'chromium-rel-mac11', | 317 waterfall, 'Mac 10.11 Perf', 'chromium-rel-mac11', |
| 318 'mac', num_host_shards=5) | 318 'mac', num_host_shards=5) |
| 319 waterfall = add_tester( | 319 waterfall = add_tester( |
| 320 waterfall, 'Mac 10.10 Perf', 'chromium-rel-mac10', | 320 waterfall, 'Mac 10.10 Perf', 'chromium-rel-mac10', |
| 321 'mac', num_host_shards=5) | 321 'mac', |
| 322 swarming=[ |
| 323 { |
| 324 'os': 'Mac-10.10', |
| 325 'device_ids': [ |
| 326 'build158-m1', 'build159-m1', 'build160-m1', |
| 327 'build161-m1', 'build162-m1'] |
| 328 } |
| 329 ]) |
| 322 waterfall = add_tester( | 330 waterfall = add_tester( |
| 323 waterfall, 'Mac Retina Perf', | 331 waterfall, 'Mac Retina Perf', |
| 324 'chromium-rel-mac-retina', 'mac', num_host_shards=5) | 332 'chromium-rel-mac-retina', 'mac', num_host_shards=5) |
| 325 waterfall = add_tester( | 333 waterfall = add_tester( |
| 326 waterfall, 'Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', num_host_shards=5) | 334 waterfall, 'Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', num_host_shards=5) |
| 327 waterfall = add_tester( | 335 waterfall = add_tester( |
| 328 waterfall, 'Mac Pro 10.11 Perf', | 336 waterfall, 'Mac Pro 10.11 Perf', |
| 329 'chromium-rel-mac11-pro', 'mac', | 337 'chromium-rel-mac11-pro', 'mac', |
| 330 swarming=[ | 338 swarming=[ |
| 331 { | 339 { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 if not sharding_map: | 448 if not sharding_map: |
| 441 raise Exception('Invalid number of shards, generate new sharding map') | 449 raise Exception('Invalid number of shards, generate new sharding map') |
| 442 device_affinity = sharding_map.get(benchmark.Name(), None) | 450 device_affinity = sharding_map.get(benchmark.Name(), None) |
| 443 if device_affinity is None: | 451 if device_affinity is None: |
| 444 raise Exception('Device affinity for benchmark %s not found' | 452 raise Exception('Device affinity for benchmark %s not found' |
| 445 % benchmark.Name()) | 453 % benchmark.Name()) |
| 446 | 454 |
| 447 device_id = dimension['device_ids'][device_affinity] | 455 device_id = dimension['device_ids'][device_affinity] |
| 448 # Id is unique within the swarming pool so it is the only needed | 456 # Id is unique within the swarming pool so it is the only needed |
| 449 # identifier for the bot to run the test on | 457 # identifier for the bot to run the test on |
| 450 swarming_dimensions.append({ | 458 complete_dimension = { |
| 451 'id': device_id, | 459 'id': device_id, |
| 452 'gpu': dimension['gpu'], | |
| 453 'os': dimension['os'], | 460 'os': dimension['os'], |
| 454 'pool': 'Chrome-perf', | 461 'pool': 'Chrome-perf', |
| 455 }) | 462 } |
| 463 if 'gpu' in dimension: |
| 464 complete_dimension['gpu'] = dimension['gpu'] |
| 465 swarming_dimensions.append(complete_dimension) |
| 456 | 466 |
| 457 test = generate_telemetry_test( | 467 test = generate_telemetry_test( |
| 458 swarming_dimensions, benchmark.Name(), browser_name) | 468 swarming_dimensions, benchmark.Name(), browser_name) |
| 459 isolated_scripts.append(test) | 469 isolated_scripts.append(test) |
| 460 # Now create another executable for this benchmark on the reference browser | 470 # Now create another executable for this benchmark on the reference browser |
| 461 reference_test = generate_telemetry_test( | 471 reference_test = generate_telemetry_test( |
| 462 swarming_dimensions, benchmark.Name(),'reference') | 472 swarming_dimensions, benchmark.Name(),'reference') |
| 463 isolated_scripts.append(reference_test) | 473 isolated_scripts.append(reference_test) |
| 464 | 474 |
| 465 return isolated_scripts | 475 return isolated_scripts |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 waterfall['name'] = 'chromium.perf' | 617 waterfall['name'] = 'chromium.perf' |
| 608 fyi_waterfall = get_fyi_waterfall_config() | 618 fyi_waterfall = get_fyi_waterfall_config() |
| 609 fyi_waterfall['name'] = 'chromium.perf.fyi' | 619 fyi_waterfall['name'] = 'chromium.perf.fyi' |
| 610 | 620 |
| 611 generate_all_tests(fyi_waterfall, True) | 621 generate_all_tests(fyi_waterfall, True) |
| 612 generate_all_tests(waterfall, False) | 622 generate_all_tests(waterfall, False) |
| 613 return 0 | 623 return 0 |
| 614 | 624 |
| 615 if __name__ == '__main__': | 625 if __name__ == '__main__': |
| 616 sys.exit(main()) | 626 sys.exit(main()) |
| OLD | NEW |