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

Side by Side Diff: tools/bisect-perf-regression.py

Issue 414893002: Check for chromium revision instead of dependency module revision. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/bisect-perf-regression_test.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 (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 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 """Performance Test Bisect Tool 6 """Performance Test Bisect Tool
7 7
8 This script bisects a series of changelists using binary search. It starts at 8 This script bisects a series of changelists using binary search. It starts at
9 a bad revision where a performance metric has regressed, and asks for a last 9 a bad revision where a performance metric has regressed, and asks for a last
10 known-good revision. It will then binary search across this revision range by 10 known-good revision. It will then binary search across this revision range by
(...skipping 2218 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 2229
2230 def _IsBisectModeUsingMetric(self): 2230 def _IsBisectModeUsingMetric(self):
2231 return self.opts.bisect_mode in [BISECT_MODE_MEAN, BISECT_MODE_STD_DEV] 2231 return self.opts.bisect_mode in [BISECT_MODE_MEAN, BISECT_MODE_STD_DEV]
2232 2232
2233 def _IsBisectModeReturnCode(self): 2233 def _IsBisectModeReturnCode(self):
2234 return self.opts.bisect_mode in [BISECT_MODE_RETURN_CODE] 2234 return self.opts.bisect_mode in [BISECT_MODE_RETURN_CODE]
2235 2235
2236 def _IsBisectModeStandardDeviation(self): 2236 def _IsBisectModeStandardDeviation(self):
2237 return self.opts.bisect_mode in [BISECT_MODE_STD_DEV] 2237 return self.opts.bisect_mode in [BISECT_MODE_STD_DEV]
2238 2238
2239 def GetCompatibleCommand(self, command_to_run, revision): 2239 def GetCompatibleCommand(self, command_to_run, revision, depot):
qyearsley 2014/07/24 00:03:18 Note -- this function does a very specific thing (
prasadv 2014/07/24 00:13:06 Initial thought was to include all compatible rela
2240 # Prior to crrev.com/274857 *only* android-chromium-testshell 2240 # Prior to crrev.com/274857 *only* android-chromium-testshell
2241 # Then until crrev.com/276628 *both* (android-chromium-testshell and 2241 # Then until crrev.com/276628 *both* (android-chromium-testshell and
2242 # android-chrome-shell) work. After that rev 276628 *only* 2242 # android-chrome-shell) work. After that rev 276628 *only*
2243 # android-chrome-shell works. bisect-perf-reggresion.py script should 2243 # android-chrome-shell works. bisect-perf-reggresion.py script should
2244 # handle these cases and set appropriate browser type based on revision. 2244 # handle these cases and set appropriate browser type based on revision.
2245 if self.opts.target_platform in ['android', 'android-chrome']: 2245 if self.opts.target_platform in ['android']:
2246 svn_revision = self.source_control.SVNFindRev(revision) 2246 # When its a third_party depot, get the chromium revision.
2247 if depot != 'chromium':
2248 revision = CheckRunGit(['rev-parse', 'HEAD'], cwd=self.src_cwd).strip()
2249 svn_revision = self.source_control.SVNFindRev(revision, cwd=self.src_cwd)
2250 if not svn_revision:
2251 return command_to_run
2247 cmd_re = re.compile('--browser=(?P<browser_type>\S+)') 2252 cmd_re = re.compile('--browser=(?P<browser_type>\S+)')
2248 matches = cmd_re.search(command_to_run) 2253 matches = cmd_re.search(command_to_run)
2249 if IsStringInt(svn_revision) and matches: 2254 if IsStringInt(svn_revision) and matches:
2250 cmd_browser = matches.group('browser_type') 2255 cmd_browser = matches.group('browser_type')
2251 if svn_revision <= 274857 and cmd_browser == 'android-chrome-shell': 2256 if svn_revision <= 274857 and cmd_browser == 'android-chrome-shell':
2252 return command_to_run.replace(cmd_browser, 2257 return command_to_run.replace(cmd_browser,
2253 'android-chromium-testshell') 2258 'android-chromium-testshell')
2254 elif (svn_revision >= 276628 and 2259 elif (svn_revision >= 276628 and
2255 cmd_browser == 'android-chromium-testshell'): 2260 cmd_browser == 'android-chromium-testshell'):
2256 return command_to_run.replace(cmd_browser, 2261 return command_to_run.replace(cmd_browser,
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 success = self.RunPostSync(depot) 2637 success = self.RunPostSync(depot)
2633 if success: 2638 if success:
2634 if skippable and self.ShouldSkipRevision(depot, revision): 2639 if skippable and self.ShouldSkipRevision(depot, revision):
2635 return ('Skipped revision: [%s]' % str(revision), 2640 return ('Skipped revision: [%s]' % str(revision),
2636 BUILD_RESULT_SKIPPED) 2641 BUILD_RESULT_SKIPPED)
2637 2642
2638 start_build_time = time.time() 2643 start_build_time = time.time()
2639 if self.BuildCurrentRevision(depot, revision): 2644 if self.BuildCurrentRevision(depot, revision):
2640 after_build_time = time.time() 2645 after_build_time = time.time()
2641 # Hack to support things that got changed. 2646 # Hack to support things that got changed.
2642 command_to_run = self.GetCompatibleCommand(command_to_run, revision) 2647 command_to_run = self.GetCompatibleCommand(
2648 command_to_run, revision, depot)
2643 results = self.RunPerformanceTestAndParseResults(command_to_run, 2649 results = self.RunPerformanceTestAndParseResults(command_to_run,
2644 metric) 2650 metric)
2645 # Restore build output directory once the tests are done, to avoid 2651 # Restore build output directory once the tests are done, to avoid
2646 # any descrepancy. 2652 # any descrepancy.
2647 if self.IsDownloadable(depot) and revision: 2653 if self.IsDownloadable(depot) and revision:
2648 self.BackupOrRestoreOutputdirectory(restore=True) 2654 self.BackupOrRestoreOutputdirectory(restore=True)
2649 2655
2650 if results[1] == 0: 2656 if results[1] == 0:
2651 external_revisions = self.Get3rdPartyRevisionsFromCurrentRevision( 2657 external_revisions = self.Get3rdPartyRevisionsFromCurrentRevision(
2652 depot, revision) 2658 depot, revision)
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
4176 # The perf dashboard scrapes the "results" step in order to comment on 4182 # The perf dashboard scrapes the "results" step in order to comment on
4177 # bugs. If you change this, please update the perf dashboard as well. 4183 # bugs. If you change this, please update the perf dashboard as well.
4178 bisect_utils.OutputAnnotationStepStart('Results') 4184 bisect_utils.OutputAnnotationStepStart('Results')
4179 print 'Error: %s' % e.message 4185 print 'Error: %s' % e.message
4180 if opts.output_buildbot_annotations: 4186 if opts.output_buildbot_annotations:
4181 bisect_utils.OutputAnnotationStepClosed() 4187 bisect_utils.OutputAnnotationStepClosed()
4182 return 1 4188 return 1
4183 4189
4184 if __name__ == '__main__': 4190 if __name__ == '__main__':
4185 sys.exit(main()) 4191 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/bisect-perf-regression_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698