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

Unified Diff: tools/auto_bisect/bisect_printer.py

Issue 1181973009: Change bisect status message to print "positive" or "negative". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove _ConfidenceLevelStatus Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f23d662d495b90a67e33fc7e702f3ad1168ff853 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
Relative Change: %(change)s
Estimated Confidence: %(confidence).02f%%
Retested CL with revert: %(retest)s"""
@@ -296,47 +296,35 @@ class BisectPrinter(object):
self._PrintTestedCommitsEntry(
bisect_results.retest_results_reverted, '', '', '')
- @staticmethod
- def _ConfidenceLevelStatus(bisect_results):
- if not bisect_results.confidence:
- return None
- confidence_status = 'Successful with %(level)s confidence%(warning)s.'
- if bisect_results.confidence >= bisect_utils.HIGH_CONFIDENCE:
- level = 'high'
- else:
- level = 'low'
- warning = ' and warnings'
- if not bisect_results.warnings:
- warning = ''
- return confidence_status % {'level': level, 'warning': warning}
-
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:
« 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