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

Unified Diff: tools/perf/measurements/endure.py

Issue 329723004: Change results.Add to results.AddResult in endure, media metrics and media benchmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Tony's comments Created 6 years, 6 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
« no previous file with comments | « tools/perf/benchmarks/media.py ('k') | tools/perf/metrics/media.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/endure.py
diff --git a/tools/perf/measurements/endure.py b/tools/perf/measurements/endure.py
index a7b809b6d2afe7904822c49cbf70ffd4fbce403b..71f6b501b37629ee7d6517c80bb12a50a7b42e97 100644
--- a/tools/perf/measurements/endure.py
+++ b/tools/perf/measurements/endure.py
@@ -83,10 +83,18 @@ class Endure(page_measurement.PageMeasurement):
def AddPoint(trace_name, units_y, value_y, chart_name=None):
"""Adds one data point to the results object."""
- results.Add(trace_name + '_X', 'iterations', self._iterations_elapsed,
- data_type='unimportant', chart_name=chart_name)
- results.Add(trace_name + '_Y', units_y, value_y, data_type='unimportant',
- chart_name=chart_name)
+ if chart_name:
+ trace_name = '%s.%s' % (chart_name, trace_name)
+ else:
+ assert '.' not in trace_name, (
+ 'Trace names cannot contain "." with an empty chart_name since this'
+ ' is used to delimit chart_name.trace_name.')
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, trace_name + '_X', 'iterations',
+ self._iterations_elapsed, important=False))
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, trace_name + '_Y', units_y, value_y,
+ important=False))
# Save the value so that summary stats can be calculated.
if trace_name not in self._y_values:
« no previous file with comments | « tools/perf/benchmarks/media.py ('k') | tools/perf/metrics/media.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698