#!/usr/bin/perl -w

my @list;
my $total;

while (<>) {
	chomp;
	if (/time:\s*(\S*)/) {
		$list[$#list + 1] = $1;
		$total += $1;
	}
}

my $cnt = $#list + 1;
if (!$cnt) {
	print "nothing to report\n";
	exit;
}
my $avg = $total / $cnt;

my $std = 0;
$cnt = 0;
foreach my $val (@list) {
	my $delta = $val - $avg;
	$std += $delta * $delta;
	$cnt++;
}
my $full_std = sqrt($cnt ? $std / $cnt : 0);

printf <<EOF;

full_total = $total
  average:   $avg
  std:       $full_std

EOF
