2 @perl compareNavStats.bat %1 %2 %3 %4 %5 %6
8 # Get numbers from args.
9 @desc = ( "first", "second" );
10 $sum1 = $ARGV[0] + $ARGV[1] + $ARGV[2];
11 $sum2 = $ARGV[3] + $ARGV[4] + $ARGV[5];
13 # Get numbers from stdin.
18 if ( /^----- (.*) -----/ ) {
22 if ( /^(\d+\.?\d*)\:\s*Navigator Window visible now/ ) {
27 $sum1 = $args[0] + $args[1] + $args[2];
28 $sum2 = $args[3] + $args[4] + $args[5];
32 $diff = $avg1 - $avg2;
33 printf "%s=%f %s=%f diff=%f (%f%% %s)\n", $desc[0], $avg1, $desc[1], $avg2, $diff, abs(($diff/$avg1)*100), ($diff>=0 ? "faster" : "slower");