[Piuparts-devel] submission-stats.pl
Andreas Beckmann
anbe at debian.org
Wed Jun 7 00:21:30 UTC 2017
Hi Holger,
run the script below on master/*/submissions.txt (or any subset thereof)
btw, piuparts-slave does not scale on this brand-new 56(=4x14)-core
machine :-(
42 processes seems to be OK, but going over 50 slows the whole thing
significantly down, with top showing ~40% system, <10% nice, ~50% idle
Andreas
-----8<-----
#!/usr/bin/perl -w
my $granularity = 86400;
my %stats = ();
while (<>)
{
my @a = split;
my $t = int($a[0] / $granularity);
++$stats{$t}{$a[1]};
}
my $tot_pass = 0;
my $tot_fail = 0;
my $tot_untestable = 0;
foreach my $k (sort keys %stats)
{
my $pass = $stats{$k}{'pass'} || 0;
my $fail = $stats{$k}{'fail'} || 0;
my $untestable = $stats{$k}{'untestable'} || 0;
my $time = gmtime($k * $granularity);
print "$time\t$pass\t$fail\t$untestable\n";
$tot_pass += $pass;
$tot_fail += $fail;
$tot_untestable += $untestable;
}
print "# total days = ", scalar keys %stats, "\n";
print "# total pass = $tot_pass\n";
print "# total fail = $tot_fail\n";
print "# total untestable = $tot_untestable\n";
More information about the Piuparts-devel
mailing list