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

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

Issue 300623006: Fix issues with gathering third party repositories for bisect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | no next file » | 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 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 deps_data = deps_data['deps'] 1422 deps_data = deps_data['deps']
1423 1423
1424 rxp = re.compile(".git@(?P<revision>[a-fA-F0-9]+)") 1424 rxp = re.compile(".git@(?P<revision>[a-fA-F0-9]+)")
1425 results = {} 1425 results = {}
1426 for depot_name, depot_data in DEPOT_DEPS_NAME.iteritems(): 1426 for depot_name, depot_data in DEPOT_DEPS_NAME.iteritems():
1427 if (depot_data.get('platform') and 1427 if (depot_data.get('platform') and
1428 depot_data.get('platform') != os.name): 1428 depot_data.get('platform') != os.name):
1429 continue 1429 continue
1430 1430
1431 if (depot_data.get('recurse') and depot in depot_data.get('from')): 1431 if (depot_data.get('recurse') and depot in depot_data.get('from')):
1432 src_dir = depot_data.get('src') or depot_data.get('src_old') 1432 src_dir = (deps_data.get(depot_data.get('src')) or
1433 deps_data.get(depot_data.get('src_old')))
1433 if src_dir: 1434 if src_dir:
1434 self.depot_cwd[depot_name] = os.path.join(self.src_cwd, src_dir[4:]) 1435 self.depot_cwd[depot_name] = os.path.join(self.src_cwd, src_dir[4:])
1435 re_results = rxp.search(deps_data.get(src_dir, '')) 1436 re_results = rxp.search(deps_data.get(src_dir, ''))
1436 if re_results: 1437 if re_results:
1437 results[depot_name] = re_results.group('revision') 1438 results[depot_name] = re_results.group('revision')
1438 else: 1439 else:
1439 warning_text = ('Couldn\'t parse revision for %s while bisecting ' 1440 warning_text = ('Couldn\'t parse revision for %s while bisecting '
1440 '%s' % (depot_name, depot)) 1441 '%s' % (depot_name, depot))
1441 if not warning_text in self.warnings: 1442 if not warning_text in self.warnings:
1442 self.warnings.append(warning_text) 1443 self.warnings.append(warning_text)
1444 else:
1445 results[depot_name] = None
1443 return results 1446 return results
1444 except ImportError: 1447 except ImportError:
1445 deps_file_contents = ReadStringFromFile(bisect_utils.FILE_DEPS_GIT) 1448 deps_file_contents = ReadStringFromFile(bisect_utils.FILE_DEPS_GIT)
1446 parse_results = self._ParseRevisionsFromDEPSFileManually( 1449 parse_results = self._ParseRevisionsFromDEPSFileManually(
1447 deps_file_contents) 1450 deps_file_contents)
1448 results = {} 1451 results = {}
1449 for depot_name, depot_revision in parse_results.iteritems(): 1452 for depot_name, depot_revision in parse_results.iteritems():
1450 depot_revision = depot_revision.strip('@') 1453 depot_revision = depot_revision.strip('@')
1451 print depot_name, depot_revision 1454 print depot_name, depot_revision
1452 for current_name, current_data in DEPOT_DEPS_NAME.iteritems(): 1455 for current_name, current_data in DEPOT_DEPS_NAME.iteritems():
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
2529 if not (DEPOT_DEPS_NAME[next_depot]["recurse"] and 2532 if not (DEPOT_DEPS_NAME[next_depot]["recurse"] and
2530 min_revision_data['depot'] in DEPOT_DEPS_NAME[next_depot]['from']): 2533 min_revision_data['depot'] in DEPOT_DEPS_NAME[next_depot]['from']):
2531 continue 2534 continue
2532 2535
2533 if current_depot == 'v8': 2536 if current_depot == 'v8':
2534 # We grab the bleeding_edge info here rather than earlier because we 2537 # We grab the bleeding_edge info here rather than earlier because we
2535 # finally have the revision range. From that we can search forwards and 2538 # finally have the revision range. From that we can search forwards and
2536 # backwards to try to match trunk revisions to bleeding_edge. 2539 # backwards to try to match trunk revisions to bleeding_edge.
2537 self._FillInV8BleedingEdgeInfo(min_revision_data, max_revision_data) 2540 self._FillInV8BleedingEdgeInfo(min_revision_data, max_revision_data)
2538 2541
2539 if (min_revision_data['external'][next_depot] == 2542 if (min_revision_data['external'].get(next_depot) ==
2540 max_revision_data['external'][next_depot]): 2543 max_revision_data['external'].get(next_depot)):
2541 continue 2544 continue
2542 2545
2543 if (min_revision_data['external'][next_depot] and 2546 if (min_revision_data['external'].get(next_depot) and
2544 max_revision_data['external'][next_depot]): 2547 max_revision_data['external'].get(next_depot)):
2545 external_depot = next_depot 2548 external_depot = next_depot
2546 break 2549 break
2547 2550
2548 return external_depot 2551 return external_depot
2549 2552
2550 def PrepareToBisectOnDepot(self, 2553 def PrepareToBisectOnDepot(self,
2551 current_depot, 2554 current_depot,
2552 end_revision, 2555 end_revision,
2553 start_revision, 2556 start_revision,
2554 previous_depot, 2557 previous_depot,
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
3894 # The perf dashboard scrapes the "results" step in order to comment on 3897 # The perf dashboard scrapes the "results" step in order to comment on
3895 # bugs. If you change this, please update the perf dashboard as well. 3898 # bugs. If you change this, please update the perf dashboard as well.
3896 bisect_utils.OutputAnnotationStepStart('Results') 3899 bisect_utils.OutputAnnotationStepStart('Results')
3897 print 'Error: %s' % e.message 3900 print 'Error: %s' % e.message
3898 if opts.output_buildbot_annotations: 3901 if opts.output_buildbot_annotations:
3899 bisect_utils.OutputAnnotationStepClosed() 3902 bisect_utils.OutputAnnotationStepClosed()
3900 return 1 3903 return 1
3901 3904
3902 if __name__ == '__main__': 3905 if __name__ == '__main__':
3903 sys.exit(main()) 3906 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698