Commit 7b26234c authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[tests] Allow filtering of benchmarks in run_perf.py.

This is a highly requested feature!

Bug: v8:6276
Change-Id: I17b606ae0ff8fa9dfdd0fa74fd1f7ad0dd3fc4f8
Reviewed-on: https://chromium-review.googlesource.com/488044
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44916}
parent 0322be81
......@@ -1000,6 +1000,12 @@ def Main(args):
"'powersave' for more stable results, or 'performance' "
"for shorter completion time of suite, with potentially "
"more noise in results.")
parser.add_option("--filter",
help="Only run the benchmarks beginning with this string. "
"For example: "
"--filter=JSTests/TypedArrays/ will run only TypedArray "
"benchmarks from the JSTests suite.",
default="")
(options, args) = parser.parse_args(args)
......@@ -1092,9 +1098,12 @@ def Main(args):
def NodeCB(node):
platform.PreTests(node, path)
# Traverse graph/trace tree and interate over all runnables.
# Traverse graph/trace tree and iterate over all runnables.
for runnable in FlattenRunnables(root, NodeCB):
print ">>> Running suite: %s" % "/".join(runnable.graphs)
runnable_name = "/".join(runnable.graphs)
if not runnable_name.startswith(options.filter):
continue
print ">>> Running suite: %s" % runnable_name
def Runner():
"""Output generator that reruns several times."""
......
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