diff -r 7bcb8b1ad9a6 -r 0b9c56a7a618 common/tools/analysis/parse_yarp_files.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/analysis/parse_yarp_files.pl Thu Jun 18 10:05:42 2009 +0100 @@ -0,0 +1,38 @@ + +my @asYarpFiles = (); +open(FILE, $ARGV[0]); +while ( ) +{ + if ( m/[^,]*,([^,]*)/ ) + { + my $sFile = $1; + chomp $sFile; +# print "$sFile\n"; + push(@asYarpFiles, $sFile); + } +} +close(FILE); +my $nYarpFiles = scalar(@asYarpFiles); +#print "Found $nYarpFiles files to parse\n"; + +my $nTotalRecipeErrors = 0; +for my $nYarpFile (@asYarpFiles) +{ + my $nRecipeErrors = 0; +# print "Parsing file $nYarpFile...\n"; + open(FILE, $nYarpFile); + while ( ) + { + if ( m/Overall attempts:\s*(\d+),(\d+)/ ) + { + print "Attempt: $1 Errors: $2\n"; + $nRecipeErrors = $2; + } + } + close(FILE); +# print "Recipe errors in $nYarpFile: $nRecipeErrors\n"; + $nTotalRecipeErrors += $nRecipeErrors; +} +#print "Total recipe errors across all files: $nTotalRecipeErrors\n"; + +print "$nTotalRecipeErrors"; \ No newline at end of file