Skip to content

Commit

Permalink
[tools] Allow to increase number of times a perf test is retried
Browse files Browse the repository at this point in the history
R=machenbach@chromium.org

No-Try: true
Bug: chromium:775123
Change-Id: I8883be60cc4860fad572ba644bbc722972551eb3
Reviewed-on: https://chromium-review.googlesource.com/1168483
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54999}
  • Loading branch information
rryk authored and Commit Bot committed Aug 9, 2018
1 parent 38b1d20 commit 01c289a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/run_perf.py
Expand Up @@ -938,6 +938,9 @@ def Main(args):
"--filter=JSTests/TypedArrays/ will run only TypedArray "
"benchmarks from the JSTests suite.",
default="")
parser.add_option("--run-count-multiplier", default=1, type="int",
help="Multipled used to increase number of times each test "
"is retried.")

(options, args) = parser.parse_args(args)

Expand Down Expand Up @@ -1042,7 +1045,8 @@ def NodeCB(node):

def Runner():
"""Output generator that reruns several times."""
for i in xrange(0, max(1, runnable.run_count)):
total_runs = runnable.run_count * options.run_count_multiplier
for i in xrange(0, max(1, total_runs)):
# TODO(machenbach): Allow timeout per arch like with run_count per
# arch.
yield platform.Run(runnable, i)
Expand Down

0 comments on commit 01c289a

Please sign in to comment.