Chromium Code Reviews| Index: tools/auto_bisect/bisect_printer.py |
| diff --git a/tools/auto_bisect/bisect_printer.py b/tools/auto_bisect/bisect_printer.py |
| index e0c5949f6cb1741f5ad74c8d1860b6714d1f8106..0f456bf3850808899654a5dc46151db3ca320141 100644 |
| --- a/tools/auto_bisect/bisect_printer.py |
| +++ b/tools/auto_bisect/bisect_printer.py |
| @@ -20,7 +20,7 @@ RESULTS_BANNER = """ |
| Status: %(status)s |
| Test Command: %(command)s |
| -Test Metric: %(metrics)s |
| +Test Metric: %(metric)s |
|
qyearsley
2015/06/18 15:55:25
Renaming metrics -> metric is minor change unrelat
|
| Relative Change: %(change)s |
| Estimated Confidence: %(confidence).02f%% |
| Retested CL with revert: %(retest)s""" |
| @@ -312,31 +312,33 @@ class BisectPrinter(object): |
| def _PrintBanner(self, bisect_results): |
| if self.opts.bisect_mode == bisect_utils.BISECT_MODE_RETURN_CODE: |
| - metrics = 'N/A' |
| + metric = 'N/A' |
| change = 'Yes' |
| else: |
| - metrics = '/'.join(self.opts.metric) |
| + metric = '/'.join(self.opts.metric) |
| change = '%.02f%% (+/-%.02f%%)' % ( |
| bisect_results.regression_size, bisect_results.regression_std_err) |
| - |
| - if bisect_results.culprit_revisions and bisect_results.confidence: |
| - status = self._ConfidenceLevelStatus(bisect_results) |
| - else: |
| - status = 'Failure, could not reproduce.' |
| - change = 'Bisect could not reproduce a change.' |
| - |
| - retest_text = 'Yes' if bisect_results.retest_results_tot else 'No' |
| + if not bisect_results.culprit_revisions: |
| + change = 'No significant change reproduced.' |
| print RESULTS_BANNER % { |
| - 'status': status, |
| + 'status': self._StatusMessage(bisect_results), |
| 'command': self.opts.command, |
| - 'metrics': metrics, |
| + 'metric': metric, |
| 'change': change, |
| 'confidence': bisect_results.confidence, |
| - 'retest': retest_text, |
| + 'retest': 'Yes' if bisect_results.retest_results_tot else 'No', |
| } |
| @staticmethod |
| + def _StatusMessage(bisect_results): |
| + if bisect_results.confidence >= bisect_utils.HIGH_CONFIDENCE: |
| + return 'Positive: Reproduced a change.' |
| + elif bisect_results.culprit_revisions: |
| + return 'Negative: Found possible suspect(s), but with low confidence.' |
| + return 'Negative: Did not reproduce a change.' |
| + |
| + @staticmethod |
| def _PrintWarnings(warnings): |
| """Prints a list of warning strings if there are any.""" |
| if not warnings: |