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

Unified Diff: tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark.py

Issue 11314012: Add spaceport benchmark to Chrome Remote Control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bug Created 8 years, 1 month 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/chrome_remote_control/chrome_remote_control/multi_page_benchmark.py
diff --git a/tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark.py b/tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark.py
index 2cc60182ba826e0e086a226f7a11d1db54eefcee..f47b91c8ac54b1fd9f8313f2182321e260df50a4 100644
--- a/tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark.py
+++ b/tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark.py
@@ -44,7 +44,10 @@ class BenchmarkResults(page_test.PageTestResults):
self._page = page
self._page_values = {}
- def Add(self, name, units, value, data_type='default'):
+ def Add(self, trace_name, units, value, chart_name=None, data_type='default'):
+ name = trace_name
+ if chart_name:
+ name = '%s.%s' % (chart_name, trace_name)
assert name not in self._page_values, 'Result names must be unique'
assert name != 'url', 'The name url cannot be used'
if self.field_names:
@@ -73,7 +76,11 @@ results! You must return the same dict keys every time."""
for measurement_units_type, values in sorted(
self.results_summary.iteritems()):
measurement, units, data_type = measurement_units_type
- trace = measurement + (trace_tag or '')
+ if '.' in measurement:
+ measurement, trace = measurement.split('.', 1)
+ trace += (trace_tag or '')
+ else:
+ trace = measurement + (trace_tag or '')
PrintPerfResult(measurement, trace, values, units, data_type)

Powered by Google App Engine
This is Rietveld 408576698