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

Side by Side Diff: tools/auto_bisect/bisect_perf_regression.py

Issue 961193002: Make perf try jobs for win x64 build x64 binaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | tools/auto_bisect/builder.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 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 """Chromium auto-bisect tool 6 """Chromium auto-bisect tool
7 7
8 This script bisects a range of commits using binary search. It starts by getting 8 This script bisects a range of commits using binary search. It starts by getting
9 reference values for the specified "good" and "bad" commits. Then, for revisions 9 reference values for the specified "good" and "bad" commits. Then, for revisions
10 in between, it will get builds, run tests and classify intermediate revisions as 10 in between, it will get builds, run tests and classify intermediate revisions as
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 1171
1172 build_success = False 1172 build_success = False
1173 cwd = os.getcwd() 1173 cwd = os.getcwd()
1174 os.chdir(self.src_cwd) 1174 os.chdir(self.src_cwd)
1175 # Fetch build archive for the given revision from the cloud storage when 1175 # Fetch build archive for the given revision from the cloud storage when
1176 # the storage bucket is passed. 1176 # the storage bucket is passed.
1177 if self.IsDownloadable(depot) and revision: 1177 if self.IsDownloadable(depot) and revision:
1178 build_success = self._DownloadAndUnzipBuild( 1178 build_success = self._DownloadAndUnzipBuild(
1179 revision, depot, build_type='Release', create_patch=create_patch) 1179 revision, depot, build_type='Release', create_patch=create_patch)
1180 else: 1180 else:
1181 # Build locally. 1181 # Print the current environment set on the machine.
1182 print 'Full Environment:'
1183 for key, value in sorted(os.environ.items()):
1184 print '%s: %s' % (key, value)
1185 # Print the environment before proceeding with compile.
1186 sys.stdout.flush()
1182 build_success = self.builder.Build(depot, self.opts) 1187 build_success = self.builder.Build(depot, self.opts)
1183 os.chdir(cwd) 1188 os.chdir(cwd)
1184 return build_success 1189 return build_success
1185 1190
1186 def RunGClientHooks(self): 1191 def RunGClientHooks(self):
1187 """Runs gclient with runhooks command. 1192 """Runs gclient with runhooks command.
1188 1193
1189 Returns: 1194 Returns:
1190 True if gclient reports no errors. 1195 True if gclient reports no errors.
1191 """ 1196 """
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
2628 'specified).') 2633 'specified).')
2629 group.add_argument('--goma_threads', type=int, default='64', 2634 group.add_argument('--goma_threads', type=int, default='64',
2630 help='Number of threads for goma, only if using goma.') 2635 help='Number of threads for goma, only if using goma.')
2631 group.add_argument('--output_buildbot_annotations', action='store_true', 2636 group.add_argument('--output_buildbot_annotations', action='store_true',
2632 help='Add extra annotation output for buildbot.') 2637 help='Add extra annotation output for buildbot.')
2633 group.add_argument('--target_arch', default='ia32', 2638 group.add_argument('--target_arch', default='ia32',
2634 dest='target_arch', choices=['ia32', 'x64', 'arm'], 2639 dest='target_arch', choices=['ia32', 'x64', 'arm'],
2635 help='The target build architecture. Choices are "ia32" ' 2640 help='The target build architecture. Choices are "ia32" '
2636 '(default), "x64" or "arm".') 2641 '(default), "x64" or "arm".')
2637 group.add_argument('--target_build_type', default='Release', 2642 group.add_argument('--target_build_type', default='Release',
2638 choices=['Release', 'Debug'], 2643 choices=['Release', 'Debug', 'Release_x64'],
2639 help='The target build type. Choices are "Release" ' 2644 help='The target build type. Choices are "Release" '
2640 '(default), or "Debug".') 2645 '(default), Release_x64 or "Debug".')
2641 group.add_argument('--builder_type', default=fetch_build.PERF_BUILDER, 2646 group.add_argument('--builder_type', default=fetch_build.PERF_BUILDER,
2642 choices=[fetch_build.PERF_BUILDER, 2647 choices=[fetch_build.PERF_BUILDER,
2643 fetch_build.FULL_BUILDER, ''], 2648 fetch_build.FULL_BUILDER, ''],
2644 help='Type of builder to get build from. This ' 2649 help='Type of builder to get build from. This '
2645 'determines both the bot that builds and the ' 2650 'determines both the bot that builds and the '
2646 'place where archived builds are downloaded from. ' 2651 'place where archived builds are downloaded from. '
2647 'For local builds, an empty string can be passed.') 2652 'For local builds, an empty string can be passed.')
2648 2653
2649 @staticmethod 2654 @staticmethod
2650 def _AddDebugOptionsGroup(parser): 2655 def _AddDebugOptionsGroup(parser):
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
2724 for k, v in values.iteritems(): 2729 for k, v in values.iteritems():
2725 assert hasattr(opts, k), 'Invalid %s attribute in BisectOptions.' % k 2730 assert hasattr(opts, k), 'Invalid %s attribute in BisectOptions.' % k
2726 setattr(opts, k, v) 2731 setattr(opts, k, v)
2727 2732
2728 if opts.metric and opts.bisect_mode != bisect_utils.BISECT_MODE_RETURN_CODE: 2733 if opts.metric and opts.bisect_mode != bisect_utils.BISECT_MODE_RETURN_CODE:
2729 metric_values = opts.metric.split('/') 2734 metric_values = opts.metric.split('/')
2730 if len(metric_values) != 2: 2735 if len(metric_values) != 2:
2731 raise RuntimeError('Invalid metric specified: [%s]' % opts.metric) 2736 raise RuntimeError('Invalid metric specified: [%s]' % opts.metric)
2732 opts.metric = metric_values 2737 opts.metric = metric_values
2733 2738
2739 if opts.target_arch == 'x64' and opts.target_build_type == 'Release':
2740 opts.target_build_type = 'Release_x64'
2734 opts.repeat_test_count = min(max(opts.repeat_test_count, 1), 100) 2741 opts.repeat_test_count = min(max(opts.repeat_test_count, 1), 100)
2735 opts.max_time_minutes = min(max(opts.max_time_minutes, 1), 60) 2742 opts.max_time_minutes = min(max(opts.max_time_minutes, 1), 60)
2736 opts.truncate_percent = min(max(opts.truncate_percent, 0), 25) 2743 opts.truncate_percent = min(max(opts.truncate_percent, 0), 25)
2737 opts.truncate_percent = opts.truncate_percent / 100.0 2744 opts.truncate_percent = opts.truncate_percent / 100.0
2738 2745
2739 return opts 2746 return opts
2740 2747
2741 2748
2742 def _ConfigureLogging(): 2749 def _ConfigureLogging():
2743 """Trivial logging config. 2750 """Trivial logging config.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 # bugs. If you change this, please update the perf dashboard as well. 2823 # bugs. If you change this, please update the perf dashboard as well.
2817 bisect_utils.OutputAnnotationStepStart('Results') 2824 bisect_utils.OutputAnnotationStepStart('Results')
2818 print 'Runtime Error: %s' % e 2825 print 'Runtime Error: %s' % e
2819 if opts.output_buildbot_annotations: 2826 if opts.output_buildbot_annotations:
2820 bisect_utils.OutputAnnotationStepClosed() 2827 bisect_utils.OutputAnnotationStepClosed()
2821 return 1 2828 return 1
2822 2829
2823 2830
2824 if __name__ == '__main__': 2831 if __name__ == '__main__':
2825 sys.exit(main()) 2832 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/auto_bisect/builder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698