Skip to content

run_smoke_bench: make num_retries configurable #27662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions benchmark/scripts/run_smoke_bench
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ def main():
argparser.add_argument(
'-num-samples', type=int,
help='The (minimum) number of samples to run', default=3)
argparser.add_argument(
'-num-reruns', type=int,
help="The number of re-runs until it's assumed to be a real change",
default=8)
argparser.add_argument(
'-platform', type=str,
help='The benchmark build platform', default='macosx')
Expand Down Expand Up @@ -120,7 +124,7 @@ def test_opt_levels(args):
if test_performance(opt_level, args.oldbuilddir[0],
args.newbuilddir[0],
float(args.threshold) / 100, args.num_samples,
output_file):
args.num_reruns, output_file):
changes = True

# There is no point in reporting code size for Onone.
Expand Down Expand Up @@ -171,7 +175,7 @@ def merge(results, other_results):


def test_performance(opt_level, old_dir, new_dir, threshold, num_samples,
output_file):
num_reruns, output_file):
"""Detect performance changes in benchmarks.

Start fast with few samples per benchmark and gradually spend more time
Expand All @@ -185,7 +189,7 @@ def test_performance(opt_level, old_dir, new_dir, threshold, num_samples,
tests = TestComparator(results[0], results[1], threshold)
changed = tests.decreased + tests.increased

while len(changed) > 0 and unchanged_length_count < 10:
while len(changed) > 0 and unchanged_length_count < num_reruns:
i += 1
if VERBOSE:
log(' test again: ' + str([test.name for test in changed]))
Expand Down