Skip to content

Commit 4517a40

Browse files
committed
Do timeout checks before doing the work, not after
Otherwise it may finish the work but then bail out with a useless answer. Quite likely this makes no difference now, but it will once we start working on issue #189.
1 parent 1353ee3 commit 4517a40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Benchable.p6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ method process($msg, $config, $code) {
8686
my $actually-tested = 0;
8787
for @commits -> $commit {
8888
FIRST my $once = Give me a ping, Vasili. One ping only, please.;
89+
if now - $start-time > TOTAL-TIME {
90+
grumble «hit the total time limit of {TOTAL-TIME} seconds»
91+
}
8992
# convert to real ids so we can look up the builds
9093
my $full-commit = self.to-full-commit: $commit;
9194
my $short-commit = self.get-short-commit: $commit;
@@ -109,9 +112,6 @@ method process($msg, $config, $code) {
109112
}
110113
$actually-tested++
111114
}
112-
if now - $start-time > TOTAL-TIME {
113-
grumble «hit the total time limit of {TOTAL-TIME} seconds»
114-
}
115115
}
116116

117117
# for these config options, check if there are any large speed differences between two commits and if so,

0 commit comments

Comments
 (0)