use strict
my $lines = 0;
my $load = 0;
my $coll = 0;
my $rel_coll = 0;
while (STDIN)
{
    m/load ([0-9]+).*?collisions ([0-9]+)/;
    die unless defined $1 and defined $2;

    $load += $1;
    $coll += $2;
    $rel_coll += $2/$1;
    ++$lines;
}

$load /= $lines;
$coll /= $lines;
$rel_coll /= $lines;

printf(Average load:         %.2f\n, $load);
printf(Average collisions:   %.2f\n, $coll);
printf(Corrected collisions: %.2f\n, $rel_coll);



