projects
/
gruntmaster-data.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6dda1f2
)
Improve gmpb check
author
Marius Gavrilescu
<marius@ieval.ro>
Mon, 16 Mar 2015 15:44:34 +0000
(17:44 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Mon, 16 Mar 2015 15:44:34 +0000
(17:44 +0200)
gruntmaster-problem
patch
|
blob
|
blame
|
history
diff --git
a/gruntmaster-problem
b/gruntmaster-problem
index 816f919917e42a3c9c1a1cca412928d85963c672..20f6a4f58f031671f480dd9dfc802e19a0a7d56b 100755
(executable)
--- a/
gruntmaster-problem
+++ b/
gruntmaster-problem
@@
-151,13
+151,13
@@
sub cmd_check {
$_->rerun for @jobs;
sleep 1 while $db->jobs->search({problem => $id, result_text => undef})->count;
$_->rerun for @jobs;
sleep 1 while $db->jobs->search({problem => $id, result_text => undef})->count;
- my (
@good_times, @fail_times
, $fail);
+ my (
%pass, %fail
, $fail);
for (@jobs) {
$_->discard_changes;
for (@jobs) {
$_->discard_changes;
- my
@times =
map { $_->{time} } @{decode_json $_->results};
-
push @good_times, @times
if $_->reference == 0;
-
push @fail_times, @times
if $_->reference == 3;
+ my
$time = max
map { $_->{time} } @{decode_json $_->results};
+
$pass{$_->format} = max ($pass{$_->format} // (), $time)
if $_->reference == 0;
+
$fail{$_->format} = max ($fail{$_->format} // (), $time)
if $_->reference == 3;
if ($_->result == $_->reference) {
say 'Job ' . $_->id . ' OK'
} else {
if ($_->result == $_->reference) {
say 'Job ' . $_->id . ' OK'
} else {
@@
-166,8
+166,8
@@
sub cmd_check {
}
}
}
}
-
say 'Max time for AC: ' . max @good_times if @good_time
s;
-
say 'Min time for TLE: ' . min @fail_times if @fail_times
;
+
printf "Min timeout for %s: %.2fs\n", $_, $pass{$_} for keys %pas
s;
+
printf "Max timeout for %s: %.2fs\n", $_, $fail{$_} for keys %fail
;
say $fail ? 'Test failed' : 'Test successful';
exit $fail if $fail;
}
say $fail ? 'Test failed' : 'Test successful';
exit $fail if $fail;
}
This page took
0.012192 seconds
and
4
git commands to generate.