Properly escape benchmark names when retrieving results.

This allows benchmarks to contain regular expression characters in their name.

BUG=
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/396203003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c9087a71
......@@ -192,14 +192,14 @@ class Graph(Node):
# TODO(machenbach): Currently that makes only sense for the leaf level.
# Multiple place holders for multiple levels are not supported.
if parent.results_regexp:
regexp_default = parent.results_regexp % suite["name"]
regexp_default = parent.results_regexp % re.escape(suite["name"])
else:
regexp_default = None
self.results_regexp = suite.get("results_regexp", regexp_default)
# A similar regular expression for the standard deviation (optional).
if parent.stddev_regexp:
stddev_default = parent.stddev_regexp % suite["name"]
stddev_default = parent.stddev_regexp % re.escape(suite["name"])
else:
stddev_default = None
self.stddev_regexp = suite.get("stddev_regexp", stddev_default)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment