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

Unified Diff: tools/telemetry/telemetry/page/html_page_measurement_results.py

Issue 22754003: Refactor BenchmarkResult.Add to take enum for data_type (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 3 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
Index: tools/telemetry/telemetry/page/html_page_measurement_results.py
===================================================================
--- tools/telemetry/telemetry/page/html_page_measurement_results.py (revision 222891)
+++ tools/telemetry/telemetry/page/html_page_measurement_results.py (working copy)
@@ -11,8 +11,10 @@
from telemetry.core import util
from telemetry.page import buildbot_page_measurement_results
+# Get build scripts into our path.
util.AddDirToPythonPath(util.GetChromiumSrcDir(), 'build', 'util')
import lastchange # pylint: disable=F0401
+from common import perf_result_data_type # pylint: disable=F0401
_TEMPLATE_HTML_PATH = os.path.join(
@@ -77,7 +79,7 @@
self._output_stream.truncate()
def _PrintPerfResult(self, measurement, trace, values, units,
- result_type='default'):
+ result_type=perf_result_data_type.DEFAULT):
super(HtmlPageMeasurementResults, self)._PrintPerfResult(
measurement, trace, values, units, result_type)
@@ -89,7 +91,7 @@
self._result_json['tests'][self._test_name]['metrics'][metric_name] = {
'current': values,
'units': units,
- 'important': result_type == 'default'
+ 'important': result_type == perf_result_data_type.DEFAULT
}
def PrintSummary(self):

Powered by Google App Engine
This is Rietveld 408576698