Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: tools/perf/core/perf_data_generator.py

Issue 2822723002: [Telemetry]Do not run power.idle_platform for reference build runs (Closed)
Patch Set: unittests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/perf/benchmark.csv ('k') | tools/perf/core/perf_data_generator_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 def generate_cplusplus_isolate_script_test(dimension): 574 def generate_cplusplus_isolate_script_test(dimension):
575 return [ 575 return [
576 generate_isolate_script_entry( 576 generate_isolate_script_entry(
577 [get_swarming_dimension(dimension, shard)], [], name, name, 577 [get_swarming_dimension(dimension, shard)], [], name, name,
578 ignore_task_failure=False) 578 ignore_task_failure=False)
579 for name, shard in dimension['perf_tests'] 579 for name, shard in dimension['perf_tests']
580 ] 580 ]
581 581
582 582
583 def generate_telemetry_tests( 583 def generate_telemetry_tests(
584 tester_config, benchmarks, benchmark_sharding_map, use_whitelist): 584 tester_config, benchmarks, benchmark_sharding_map, use_whitelist,
585 benchmark_ref_build_blacklist=None):
586 if benchmark_ref_build_blacklist is None:
587 benchmark_ref_build_blacklist = BENCHMARK_REF_BUILD_BLACKLIST
nednguyen 2017/04/14 18:09:02 Sorry, I mean that we should update the caller of
rnephew (Reviews Here) 2017/04/14 18:19:37 Done.
585 isolated_scripts = [] 588 isolated_scripts = []
586 # First determine the browser that you need based on the tester 589 # First determine the browser that you need based on the tester
587 browser_name = '' 590 browser_name = ''
588 if tester_config['platform'] == 'android': 591 if tester_config['platform'] == 'android':
589 browser_name = 'android-chromium' 592 browser_name = 'android-chromium'
590 elif (tester_config['platform'] == 'win' 593 elif (tester_config['platform'] == 'win'
591 and tester_config['target_bits'] == 64): 594 and tester_config['target_bits'] == 64):
592 browser_name = 'release_x64' 595 browser_name = 'release_x64'
593 else: 596 else:
594 browser_name ='release' 597 browser_name ='release'
(...skipping 22 matching lines...) Expand all
617 if device_affinity is None: 620 if device_affinity is None:
618 raise Exception('Device affinity for benchmark %s not found' 621 raise Exception('Device affinity for benchmark %s not found'
619 % benchmark.Name()) 622 % benchmark.Name())
620 swarming_dimensions.append( 623 swarming_dimensions.append(
621 get_swarming_dimension(dimension, device_affinity)) 624 get_swarming_dimension(dimension, device_affinity))
622 625
623 test = generate_telemetry_test( 626 test = generate_telemetry_test(
624 swarming_dimensions, benchmark.Name(), browser_name) 627 swarming_dimensions, benchmark.Name(), browser_name)
625 isolated_scripts.append(test) 628 isolated_scripts.append(test)
626 # Now create another executable for this benchmark on the reference browser 629 # Now create another executable for this benchmark on the reference browser
627 reference_test = generate_telemetry_test( 630 # if it is not blacklisted from running on the reference browser.
628 swarming_dimensions, benchmark.Name(),'reference') 631 if benchmark.Name() not in benchmark_ref_build_blacklist:
629 isolated_scripts.append(reference_test) 632 reference_test = generate_telemetry_test(
630 if current_shard == (num_shards - 1): 633 swarming_dimensions, benchmark.Name(),'reference')
631 current_shard = 0 634 isolated_scripts.append(reference_test)
632 else: 635 if current_shard == (num_shards - 1):
633 current_shard += 1 636 current_shard = 0
637 else:
638 current_shard += 1
634 639
635 return isolated_scripts 640 return isolated_scripts
636 641
637 642
638 BENCHMARK_NAME_WHITELIST = set([ 643 BENCHMARK_NAME_WHITELIST = set([
639 u'smoothness.top_25_smooth', 644 u'smoothness.top_25_smooth',
640 u'sunspider', 645 u'sunspider',
641 u'system_health.webview_startup', 646 u'system_health.webview_startup',
642 u'page_cycler_v2.intl_hi_ru', 647 u'page_cycler_v2.intl_hi_ru',
643 u'dromaeo.cssqueryjquery', 648 u'dromaeo.cssqueryjquery',
(...skipping 17 matching lines...) Expand all
661 } 666 }
662 667
663 # Certain swarming bots are not sharding correctly with the new device affinity 668 # Certain swarming bots are not sharding correctly with the new device affinity
664 # algorithm. Reverting to legacy algorithm to try and get them to complete. 669 # algorithm. Reverting to legacy algorithm to try and get them to complete.
665 # See crbug.com/670284 670 # See crbug.com/670284
666 LEGACY_DEVICE_AFFIINITY_ALGORITHM = [ 671 LEGACY_DEVICE_AFFIINITY_ALGORITHM = [
667 'Win Zenbook Perf', 672 'Win Zenbook Perf',
668 'Win 10 High-DPI Perf', 673 'Win 10 High-DPI Perf',
669 ] 674 ]
670 675
676 # List of benchmarks that are to never be run with reference builds.
677 BENCHMARK_REF_BUILD_BLACKLIST = [
678 'power.idle_platform',
679 ]
680
681
671 def current_benchmarks(use_whitelist): 682 def current_benchmarks(use_whitelist):
672 benchmarks_dir = os.path.join(src_dir(), 'tools', 'perf', 'benchmarks') 683 benchmarks_dir = os.path.join(src_dir(), 'tools', 'perf', 'benchmarks')
673 top_level_dir = os.path.dirname(benchmarks_dir) 684 top_level_dir = os.path.dirname(benchmarks_dir)
674 685
675 all_benchmarks = discover.DiscoverClasses( 686 all_benchmarks = discover.DiscoverClasses(
676 benchmarks_dir, top_level_dir, benchmark_module.Benchmark, 687 benchmarks_dir, top_level_dir, benchmark_module.Benchmark,
677 index_by_class_name=True).values() 688 index_by_class_name=True).values()
678 # Remove all blacklisted benchmarks 689 # Remove all blacklisted benchmarks
679 for blacklisted in BENCHMARK_NAME_BLACKLIST: 690 for blacklisted in BENCHMARK_NAME_BLACKLIST:
680 for benchmark in all_benchmarks: 691 for benchmark in all_benchmarks:
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 return 0 977 return 0
967 else: 978 else:
968 print ('The perf JSON config files are not up-to-date. Please run %s ' 979 print ('The perf JSON config files are not up-to-date. Please run %s '
969 'without --validate-only flag to update the perf JSON ' 980 'without --validate-only flag to update the perf JSON '
970 'configs and benchmark.csv.') % sys.argv[0] 981 'configs and benchmark.csv.') % sys.argv[0]
971 return 1 982 return 1
972 else: 983 else:
973 update_all_tests([fyi_waterfall, waterfall]) 984 update_all_tests([fyi_waterfall, waterfall])
974 update_benchmark_csv() 985 update_benchmark_csv()
975 return 0 986 return 0
OLDNEW
« no previous file with comments | « tools/perf/benchmark.csv ('k') | tools/perf/core/perf_data_generator_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698