Index: scripts/slave/recipe_modules/auto_bisect/bisector.py |
diff --git a/scripts/slave/recipe_modules/auto_bisect/bisector.py b/scripts/slave/recipe_modules/auto_bisect/bisector.py |
index 809d33bdaeba8457293d0a36e132c12dd2abd434..5d94e954e3656d30cdba2123acfaea9d352cdf06 100644 |
--- a/scripts/slave/recipe_modules/auto_bisect/bisector.py |
+++ b/scripts/slave/recipe_modules/auto_bisect/bisector.py |
@@ -5,7 +5,7 @@ |
import json |
import re |
-from . import bisect_results |
+from . import bisect_results_json |
from . import depot_config |
from . import revision_state |
@@ -464,7 +464,13 @@ class Bisector(object): |
"""Returns a string table showing revisions and their values.""" |
header = [['Revision', 'Values']] |
rows = [[str(r.commit_pos), str(r.values)] for r in self.revisions] |
- return bisect_results.pretty_table(header + rows) |
+ return self._pretty_table(header + rows) |
+ |
+ def _pretty_table(self, data): |
+ results = [] |
+ for row in data: |
+ results.append('%-15s' * len(row) % tuple(row)) |
+ return '\n'.join(results) |
def _t_test_results(self): |
"""Returns a string showing t-test results for lkgr and fkbr.""" |
@@ -480,9 +486,6 @@ class Bisector(object): |
] |
return '\n'.join(lines) |
- def partial_results(self): |
- return bisect_results.BisectResults(self, partial=True).as_string() |
- |
def print_result_debug_info(self): |
"""Prints extra debug info at the end of the bisect process.""" |
lines = self._results_debug_message().splitlines() |
@@ -491,16 +494,11 @@ class Bisector(object): |
self.api.m.step('Debug Info', []) |
self.api.m.step.active_result.presentation.logs['Debug Info'] = lines |
- def print_result(self): |
- results = bisect_results.BisectResults(self).as_string() |
- self.api.m.python.inline( |
- 'Results', |
- """ |
- import shutil |
- import sys |
- shutil.copyfileobj(open(sys.argv[1]), sys.stdout) |
- """, |
- args=[self.api.m.raw_io.input(data=results)]) |
+ def post_result(self, halt_on_failure=False): |
+ """Posts bisect results to Perf Dashboard.""" |
+ results = bisect_results_json.get(self) |
+ self.api.m.perf_dashboard.set_default_config() |
+ self.api.m.perf_dashboard.post_bisect(results, halt_on_failure) |
qyearsley
2016/01/11 22:49:43
Nice, I'm glad we can re-use the perf_dashboard re
|
def get_revision_to_eval(self): |
"""Gets the next RevistionState object in the candidate range. |
@@ -791,4 +789,3 @@ class Bisector(object): |
self.result_codes.add(result_code) |
properties = self.api.m.step.active_result.presentation.properties |
properties['extra_result_code'] = sorted(self.result_codes) |
- |