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

Unified Diff: mojo/devtools/common/devtoolslib/perf_dashboard.py

Issue 1427463003: Teach `mojo_benchmark` to upload results to perf dashboard. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 2 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 | mojo/devtools/common/docs/mojo_benchmark.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/devtools/common/devtoolslib/perf_dashboard.py
diff --git a/mojo/devtools/common/devtoolslib/perf_dashboard.py b/mojo/devtools/common/devtoolslib/perf_dashboard.py
index e406b09ec9fc1414d29aeefd4401c01b27b8da5a..235eab40b7d126d471b1b8f5155eebf43f31af04 100644
--- a/mojo/devtools/common/devtoolslib/perf_dashboard.py
+++ b/mojo/devtools/common/devtoolslib/perf_dashboard.py
@@ -91,6 +91,19 @@ def add_argparse_server_arguments(parser):
'upload the data.')
+def normalize_label(label):
+ """Normalizes a label to be used for data sent to performance dashboard.
+
+ This replaces:
+ '/' -> '-', as slashes are used to denote test/sub-test relation.
+ ' ' -> '_', as there is a convention of not using spaces in test names.
+
+ Returns:
+ Normalized label.
+ """
+ return label.replace('/', '-').replace(' ', '_')
+
+
def _get_commit_count():
"""Returns the number of git commits in the repository of the cwd."""
return subprocess.check_output(
« no previous file with comments | « no previous file | mojo/devtools/common/docs/mojo_benchmark.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698