| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import json | 5 import json |
| 6 import re | 6 import re |
| 7 import time | 7 import time |
| 8 import urllib | 8 import urllib |
| 9 | 9 |
| 10 from . import config_validation | 10 from . import config_validation |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 result = 'bisector.lkgr: %r\n' % self.lkgr | 641 result = 'bisector.lkgr: %r\n' % self.lkgr |
| 642 result += 'bisector.fkbr: %r\n\n' % self.fkbr | 642 result += 'bisector.fkbr: %r\n\n' % self.fkbr |
| 643 result += self._revision_value_table() | 643 result += self._revision_value_table() |
| 644 if (self.lkgr and self.lkgr.values and self.fkbr and self.fkbr.values): | 644 if (self.lkgr and self.lkgr.values and self.fkbr and self.fkbr.values): |
| 645 result += '\n' + self._t_test_results() | 645 result += '\n' + self._t_test_results() |
| 646 return result | 646 return result |
| 647 | 647 |
| 648 def _revision_value_table(self): | 648 def _revision_value_table(self): |
| 649 """Returns a string table showing revisions and their values.""" | 649 """Returns a string table showing revisions and their values.""" |
| 650 header = [['Revision', 'Values']] | 650 header = [['Revision', 'Values']] |
| 651 rows = [[r.revision_string(), str(r.values)] for r in self.revisions] | 651 with self._api.m.step.nest('Resolving hashes'): |
| 652 rows = [[r.revision_string(), str(r.values)] for r in self.revisions] |
| 652 return self._pretty_table(header + rows) | 653 return self._pretty_table(header + rows) |
| 653 | 654 |
| 654 def _pretty_table(self, data): | 655 def _pretty_table(self, data): |
| 655 results = [] | 656 results = [] |
| 656 for row in data: | 657 for row in data: |
| 657 results.append('%-15s' * len(row) % tuple(row)) | 658 results.append('%-15s' * len(row) % tuple(row)) |
| 658 return '\n'.join(results) | 659 return '\n'.join(results) |
| 659 | 660 |
| 660 def _t_test_results(self): | 661 def _t_test_results(self): |
| 661 """Returns a string showing t-test results for lkgr and fkbr.""" | 662 """Returns a string showing t-test results for lkgr and fkbr.""" |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 }) | 963 }) |
| 963 return revision_rows | 964 return revision_rows |
| 964 | 965 |
| 965 def _get_build_url(self): | 966 def _get_build_url(self): |
| 966 properties = self.api.m.properties | 967 properties = self.api.m.properties |
| 967 bot_url = properties.get('buildbotURL', | 968 bot_url = properties.get('buildbotURL', |
| 968 'http://build.chromium.org/p/chromium/') | 969 'http://build.chromium.org/p/chromium/') |
| 969 builder_name = urllib.quote(properties.get('buildername', '')) | 970 builder_name = urllib.quote(properties.get('buildername', '')) |
| 970 builder_number = str(properties.get('buildnumber', '')) | 971 builder_number = str(properties.get('buildnumber', '')) |
| 971 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number) | 972 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number) |
| OLD | NEW |