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 | 7 |
8 # The perf dashboard looks for a string like "Estimated Confidence: 95%" | 8 # The perf dashboard looks for a string like "Estimated Confidence: 95%" |
9 # to decide whether or not to cc the author(s). If you change this, please | 9 # to decide whether or not to cc the author(s). If you change this, please |
10 # update the perf dashboard as well. | 10 # update the perf dashboard as well. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 body = '' | 133 body = '' |
134 if self.culprit_cl_hash: | 134 if self.culprit_cl_hash: |
135 body += _RESULTS_REVISION_INFO % { | 135 body += _RESULTS_REVISION_INFO % { |
136 'subject': self.culprit_subject, | 136 'subject': self.culprit_subject, |
137 'author': self.culprit_author, | 137 'author': self.culprit_author, |
138 'cl_date': self.culprit_date, | 138 'cl_date': self.culprit_date, |
139 'commit_info': self.commit_info, | 139 'commit_info': self.commit_info, |
140 'cl': self.culprit_cl_hash | 140 'cl': self.culprit_cl_hash |
141 } | 141 } |
142 body += self._compose_revisions_table() | 142 body += self._compose_revisions_table() |
143 return body | 143 return body.encode('ascii','replace') |
144 | 144 |
145 def _make_footer(self): | 145 def _make_footer(self): |
146 return _RESULTS_THANKYOU | 146 return _RESULTS_THANKYOU |
147 | 147 |
148 def _gather_results(self): | 148 def _gather_results(self): |
149 # TODO(robertocn): Add viewcl link here. | 149 # TODO(robertocn): Add viewcl link here. |
150 # TODO(robertocn): Merge this into constructor. | 150 # TODO(robertocn): Merge this into constructor. |
151 bisector = self._bisector | 151 bisector = self._bisector |
152 config = bisector.bisect_config | 152 config = bisector.bisect_config |
153 | 153 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 column_widths = [0] * len(data[0]) | 244 column_widths = [0] * len(data[0]) |
245 for line in data: | 245 for line in data: |
246 column_widths = [max(longest_len, len(prop)) for | 246 column_widths = [max(longest_len, len(prop)) for |
247 longest_len, prop in zip(column_widths, line)] | 247 longest_len, prop in zip(column_widths, line)] |
248 for line in data: | 248 for line in data: |
249 for prop, width in zip(line, column_widths): | 249 for prop, width in zip(line, column_widths): |
250 result += prop.ljust(width + 1) | 250 result += prop.ljust(width + 1) |
251 result += '\n' | 251 result += '\n' |
252 return result | 252 return result |
253 | 253 |
OLD | NEW |