-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrc-stats
More file actions
executable file
·72 lines (53 loc) · 2.23 KB
/
Copy pathrc-stats
File metadata and controls
executable file
·72 lines (53 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/local/bin/perl
## summarize benchmark runs
#c# 2016-08-18 2016-08-23 2016-08-24 2016-12-29 2018-01-17 2018-02-10 2018-02-13 2018-03-28 2018-04-12
#n# find slow programs:
#n# pg 'user.*\d\d\d\.' bench/moar/*err | pf 's#^.*/(.*?)\.err:user\s+(.*?)\..*$#$2 $1#' | sort -n -r
use feature 'say';
chdir "$ENV{HOME}/perl6/Rosetta-Code" || die;
my $pcre = "$ENV{HOME}/bin/pcregrep";
my $days = $ARGV[0] || 1; # if just digits, show 'd' days, otherwise match directory names
my @dir = glob("bench/20*");
for my $d (reverse sort @dir) {
next if $d =~ /moar|jvm|gz/;
if ($days =~ /\D/) { next unless $d =~ /$days/ }
else { last if $cnt++ == $days }
tally($d);
}
exit unless defined $ARGV[1];
#print "\n==== no tests? ====\n";
#print `grep 'MOAR: OK' [0-Z]/* | pcregrep -v '\\.\\d' | perl -npe 's/:.*//' | xargs grep dummy | grep :is | perl -npe 's/:.*//'`;
#print "\n==== no 'use Test' ====\n";
#print `./bin/rc-testy [0-Z]/*`;
#exit unless defined $ARGV[2];
print "\n==== BROKEN ====\n\n";
print `grep 'MOAR: BROKEN' [0-Z]/* | $pcre -v '\\.\\d' | perl -npe 's/:.*//'`;
#####
sub tally {
my($dir) = @_;
my($m,$s,$t,$rc,$cnt,$sum,@top);
my($date) = $dir =~ m#bench/(.*)-[jm]#;
my $subdir = `uname -a` =~ /Mac-Pro/ ? 'meta' : 'bench'; # kludge alert!
my $rkbuild = `grep $date $subdir/rakudo-builds.txt`;
$rkbuild =~ s/^.*This is //; $rkbuild =~ s/\s+$//;
say "=========> $rkbuild <=========\n";
open TIMINGS, "grep user $dir/*err |";
while ($_ = <TIMINGS>) {
$cnt++;
$rc++ unless m#-[2-9]\.err:#;
($time) = /user\s+(\d+)/;
push @top, int($time) if $time > 100;
$sum += $time;
}
close TIMINGS;
my $top;
$isbad = '(not ok|not yet implemented)';
for my $t (sort { $b <=> $a } @top) { $top .= "$t "; last if length $top > 30}
(my $path = $dir) =~ s/bench.//;
$err = `$pcre 'STDERR|^Files.*differ' $dir/*out | wc -l`; $err =~ s/\s//g;
$notok = `$pcre '$isbad' $dir/*out | wc -l`; $notok =~ s/\s//g;
$ok = `$pcre 'ok \\d|are identical\$' $dir/*out | wc -l`; $ok =~ s/\s//g;
printf "$path Secs: %5d RC: $rc Tasks: $cnt OK: %4d Err: %2d !OK: %2d Top: $top\n", int($sum), $ok, $err, $notok ;
system("$pcre -l 'not ok|STDERR|^Files.*differ' $dir/*out | perl -npe 's#.*/##;s/\\.out//'") if $err > 0;
print "\n";
}