Chromium Code Reviews| Index: tools/bisect-perf-regression.py |
| diff --git a/tools/bisect-perf-regression.py b/tools/bisect-perf-regression.py |
| index 62d991c9c503f7aef18c694f748758c77de7ae4e..48178260a94fda59eadc0c55d459eb3b2a01a377 100755 |
| --- a/tools/bisect-perf-regression.py |
| +++ b/tools/bisect-perf-regression.py |
| @@ -2237,6 +2237,7 @@ class BisectPerformanceMetrics(object): |
| max_revision -= 1 |
| if self.opts.output_buildbot_annotations: |
| + self._PrintPartialResults(results) |
| bisect_utils.OutputAnnotationStepClosed() |
| else: |
| # Weren't able to sync and retrieve the revision range. |
| @@ -2245,6 +2246,40 @@ class BisectPerformanceMetrics(object): |
| return results |
| + def _PrintPartialResults(self, results_dict): |
| + revision_data = results_dict['revision_data'] |
| + revision_data_sorted = sorted(revision_data.iteritems(), |
| + key = lambda x: x[1]['sort']) |
| + results_dict = self._GetResultsDict(revision_data, revision_data_sorted) |
| + first_working_revision = results_dict['first_working_revision'] |
| + last_broken_revision = results_dict['last_broken_revision'] |
| + |
| + print 'Partial results:' |
| + print ' %20s %40s %12s %14s %13s' % ('Depot'.center(20, ' '), |
| + 'Commit SHA'.center(40, ' '), 'Mean'.center(12, ' '), |
| + 'Std. Error'.center(14, ' '), 'State'.center(13, ' ')) |
| + state = 0 |
| + for current_id, current_data in revision_data_sorted: |
|
tonyg
2014/01/06 22:44:57
Seems like there could be some code reuse here, bu
shatch
2014/01/06 23:35:48
Folded it all into _PrintTestedCommitsTable.
|
| + if current_data['value']: |
| + if (current_id == last_broken_revision or |
| + current_id == first_working_revision): |
| + state += 1 |
| + if state == 2: |
| + |
| + state_str = 'Bad' |
| + if state == 2: |
| + state_str = 'Good' |
| + state_str = state_str.center(13, ' ') |
| + |
| + std_error = ('+-%.02f' % |
| + current_data['value']['std_err']).center(14, ' ') |
| + mean = ('%.02f' % current_data['value']['mean']).center(12, ' ') |
| + print ' %20s %40s %12s %14s %13s' % ( |
| + current_data['depot'].center(20, ' '), current_id, mean, |
| + std_error, state_str) |
| + |
| def _PrintConfidence(self, results_dict): |
| # The perf dashboard specifically looks for the string |
| # "Confidence in Bisection Results: 100%" to decide whether or not |
| @@ -2380,6 +2415,7 @@ class BisectPerformanceMetrics(object): |
| if not self.warnings: |
| return |
| + self.warnings = set(self.warnings) |
| print 'WARNINGS:' |
| for w in self.warnings: |
|
tonyg
2014/01/06 22:44:57
Nit: Just inline the set() here.
shatch
2014/01/06 23:35:48
Done.
|
| print ' !!! %s' % w |