Skip to content

Commit 27c7308

Browse files
author
Geoffrey Broadwell
committed
Don't accidentally skip saving any partial data gathered so far for a given compiler on a given test
1 parent aaafd8a commit 27c7308

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

timeall

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -410,39 +410,40 @@ sub time_all_compilers {
410410
say '+++ Determining compile time for this test ...' if $verbose;
411411
my $run_times = time_command(\@compile, \@run, $overhead_runs, 0, 0, $expected->(0), $verbose);
412412
push @all_times, @{$run_times || []};
413+
413414
if (!$run_times || grep { $_->{failed} } @$run_times) {
414415
warn "Compiler $name is failing at scale=0 for test $test->{name}, aborting remaining runs.\n";
415-
next;
416416
}
417-
418-
say '+++ Running scaled timings for this test ...' if $verbose;
419-
my $min_run_time = min(map { $_->{time} } @$run_times);
420-
my $startup_time = $startup ? $startup->{$name} || 0 : 0;
421-
my $ignore_time = max($startup_time, $min_run_time);
422-
423-
# Run scaled timing loop
424-
my $scale_points = 0;
425-
while ($run_times && ($lowest < $enough_time || $scale_points < $min_scaling_points)) {
426-
$run_times = time_command(\@compile, \@run, $runs, $scale, $work->($scale), $expected->($scale), $verbose);
427-
push @all_times, @{$run_times || []};
428-
if (!$run_times || grep { $_->{failed} } @$run_times) {
429-
warn "Compiler $name is failing at scale=$scale for test $test->{name}, aborting remaining runs.\n";
430-
last;
417+
else {
418+
say '+++ Running scaled timings for this test ...' if $verbose;
419+
my $min_run_time = min(map { $_->{time} } @$run_times);
420+
my $startup_time = $startup ? $startup->{$name} || 0 : 0;
421+
my $ignore_time = max($startup_time, $min_run_time);
422+
423+
# Run scaled timing loop
424+
my $scale_points = 0;
425+
while ($run_times && ($lowest < $enough_time || $scale_points < $min_scaling_points)) {
426+
$run_times = time_command(\@compile, \@run, $runs, $scale, $work->($scale), $expected->($scale), $verbose);
427+
push @all_times, @{$run_times || []};
428+
$scale_points++;
429+
430+
if (!$run_times || grep { $_->{failed} } @$run_times) {
431+
warn "Compiler $name is failing at scale=$scale for test $test->{name}, aborting remaining runs.\n";
432+
last;
433+
}
434+
435+
$lowest = min(map { $_->{time} } @$run_times);
436+
$lowest -= $ignore_time;
437+
$scale = $test->{scaling} eq 'linear' ? $scale + 1
438+
: $scale * 2;
431439
}
432-
$scale_points++;
433-
434-
$lowest = min(map { $_->{time} } @$run_times);
435-
$lowest -= $ignore_time;
436-
$scale = $test->{scaling} eq 'linear' ? $scale + 1
437-
: $scale * 2;
438440
}
439441
}
440442
else {
441443
my $run_times = time_command(\@compile, \@run, $runs, 1, 1, $expected->(1), $verbose);
442444
push @all_times, @{$run_times || []};
443445
if (!$run_times || grep { $_->{failed} } @$run_times) {
444446
warn "Compiler $name is failing for test $test->{name}, continuing to next compiler/test.\n";
445-
next;
446447
}
447448
}
448449

0 commit comments

Comments
 (0)