2 use Time::Local ('timegm');
14 open($fh, "<", $ARGV[0]) || die "can't open ".$ARGV[0];
21 die "not a decimal number: '$max'";
27 if (m/^testsuite: (.*)/) {
31 if (m/testsuite-\w+:/) {
32 $hash{"$name -> ".($end - $start)} = $end - $start;
36 if (m/^time: (\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)/ && $intest) {
37 my $ts=timegm($6,$5,$4,$3,$2 - 1,$1 - 1900);
45 my @sorted = sort { $hash{$b}<=>$hash{$a} } keys(%hash);
46 $max = $#sorted unless $max or ($max < $#sorted);
47 for my $l (@sorted[0..($max - 1)]) {