Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.2 KiB

  1. @rem = '
  2. @goto endofperl
  3. ';
  4. $USAGE = "
  5. Usage: $0 <frs debug log file>
  6. ";
  7. die $USAGE unless @ARGV;
  8. printf("\n\n");
  9. $linenumber = 0;
  10. $InFile = "";
  11. $errorcount = 0;
  12. while (<>) {
  13. if ($InFile ne $ARGV) {
  14. $InFile = $ARGV;
  15. printf("Processing file %s \n\n", $InFile);
  16. $infilelist = $infilelist . " " . $InFile;
  17. $linenumber = 0;
  18. }
  19. $linenumber++;
  20. chop;
  21. #
  22. # <ChgOrdInsertProcessQueue: 1832: 12796: S3: 16:54:36> :X: b2f0817d, Flags [JoinGuidValid UnJoinGuidValid ]
  23. #
  24. ($func, $thrd, $srcline, $sev, $hr, $min, $sec, $rest) = m/^\<(.*): *([0-9]*): *([0-9]*): *(S[0-9]): *(..):(..):(..)\>(.*)/;
  25. $time = ((($hr * 60) + $min) * 60) + $sec;
  26. $delta = $time - $lasttime;
  27. if ($hr eq "") {next;}
  28. $dist{$delta}++;
  29. if ($delta == 0) {
  30. if (--$dup == 0) {print "...\n"; next;}
  31. if ($dup < 0) {next;}
  32. } else {
  33. $dup = 3;
  34. }
  35. printf "%-8d %s:%s:%s %5d\n", $linenumber, $hr, $min, $sec, $delta;
  36. $lasttime = $time
  37. }
  38. print "\n\n";
  39. foreach $param (sort numerically keys(%dist)) {
  40. printf("%-8d %6d\n", $param, $dist{$param});
  41. }
  42. exit;
  43. sub numerically {$a <=> $b; }
  44. __END__
  45. :endofperl
  46. @perl %~dpn0.cmd %*