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

Unified Diff: build/android/pylib/perf_tests_helper.py

Issue 14780004: [Telemetry] Escape URLs in "Pages:" list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also escape commas Created 7 years, 7 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 | « no previous file | tools/telemetry/telemetry/page/page_measurement_results.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/perf_tests_helper.py
diff --git a/build/android/pylib/perf_tests_helper.py b/build/android/pylib/perf_tests_helper.py
index 7b296a855df8f58e3698f732731cd72c2eaf486f..cb4085035d8f77e36b5c35014e8dad371d0bdbcb 100644
--- a/build/android/pylib/perf_tests_helper.py
+++ b/build/android/pylib/perf_tests_helper.py
@@ -19,7 +19,7 @@ RESULT_TYPES = {'unimportant': 'RESULT ',
def _EscapePerfResult(s):
"""Escapes |s| for use in a perf result."""
- return re.sub('[\:|=/#&]', '_', s)
+ return re.sub('[\:|=/#&,]', '_', s)
def GeomMeanAndStdDevFromHistogram(histogram_json):
@@ -66,6 +66,11 @@ def _MeanAndStdDevFromList(values):
return value, avg, sd
+def PrintPages(page_list):
+ """Prints list of pages to stdout in the format required by perf tests."""
+ print 'Pages: [%s]' % ','.join([_EscapePerfResult(p) for p in page_list])
+
+
def PrintPerfResult(measurement, trace, values, units, result_type='default',
print_to_stdout=True):
"""Prints numerical data to stdout in the format required by perf tests.
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/page_measurement_results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698