| Index: tools/telemetry/telemetry/page/buildbot_page_measurement_results.py
|
| ===================================================================
|
| --- tools/telemetry/telemetry/page/buildbot_page_measurement_results.py (revision 218037)
|
| +++ tools/telemetry/telemetry/page/buildbot_page_measurement_results.py (working copy)
|
| @@ -7,6 +7,7 @@
|
|
|
| from telemetry.page import page_measurement_results
|
| from telemetry.page import perf_tests_helper
|
| +from telemetry.page import result_data_type
|
|
|
| class BuildbotPageMeasurementResults(
|
| page_measurement_results.PageMeasurementResults):
|
| @@ -15,7 +16,7 @@
|
| self._trace_tag = trace_tag
|
|
|
| def _PrintPerfResult(self, measurement, trace, values, units,
|
| - result_type='default'):
|
| + result_type=result_data_type.DEFAULT):
|
| perf_tests_helper.PrintPerfResult(
|
| measurement, trace, values, units, result_type)
|
|
|
| @@ -64,11 +65,11 @@
|
| results_summary.iteritems()):
|
| measurement, units, data_type = measurement_units_type
|
|
|
| - if 'histogram' in data_type:
|
| - by_url_data_type = 'unimportant-histogram'
|
| + if result_data_type.IsHistogram(data_type):
|
| + by_url_data_type = result_data_type.UNIMPORTANT_HISTOGRAM
|
| else:
|
| - by_url_data_type = 'unimportant'
|
| - if '.' in measurement and 'histogram' not in data_type:
|
| + by_url_data_type = result_data_type.UNIMPORTANT
|
| + if '.' in measurement and not result_data_type.IsHistogram(data_type):
|
| measurement, trace = measurement.split('.', 1)
|
| trace += self._trace_tag
|
| else:
|
| @@ -80,7 +81,7 @@
|
| ((self.errors or self.failures) and len(value_url_list) == 1)):
|
| url_value_map = defaultdict(list)
|
| for value, url in value_url_list:
|
| - if 'histogram' in data_type and url_value_map[url]:
|
| + if result_data_type.IsHistogram(data_type) and url_value_map[url]:
|
| # TODO(tonyg/marja): The histogram processing code only accepts one
|
| # histogram, so we only report the first histogram. Once histograms
|
| # support aggregating multiple values, this can be removed.
|
| @@ -96,7 +97,8 @@
|
| # For histograms, we don't print the average data, only the _by_url,
|
| # unless there is only 1 page in which case the _by_urls are omitted.
|
| if not (self.errors or self.failures):
|
| - if 'histogram' not in data_type or len(value_url_list) == 1:
|
| + if (not result_data_type.IsHistogram(data_type) or
|
| + len(value_url_list) == 1):
|
| values = [i[0] for i in value_url_list]
|
| if isinstance(values[0], list):
|
| values = list(chain.from_iterable(values))
|
|
|