make-cputime-page.pl 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/usr/bin/perl -w
  2. use strict;
  3. my $filename;
  4. my $compiler;
  5. my $time = 0;
  6. my $ct = 0;
  7. my $first = 2;
  8. print "<html>\n<head>\n<title>\nCompile Times</title>\n</head>\n\n";
  9. print "<body bgcolor=\"#ffffff\" text=\"#000000\">\n";
  10. print "<img border=\"0\" src=\"boost.png\" width=\"277\" height=\"86\">";
  11. print "<p>\n";
  12. print "Compile time for each successful regression test in seconds.\n";
  13. print "<p>\n";
  14. print "<table border=\"1\">\n";
  15. print "<tr><td>Test</td>\n";
  16. while(<>) {
  17. if(/^\*\*\* (.*) \*\*\*$/) {
  18. $filename = $1;
  19. $first = ($first == 0 ? 0 : $first-1);
  20. if($first == 0) {
  21. print "</tr>\n\n<tr align=right>\n<td align=left><a href=\"http://www.boost.org/$filename\">$filename</a></td>\n";
  22. }
  23. } elsif(/^\*\* (.*)/) {
  24. $compiler = $1;
  25. if($first) {
  26. print "<td>$compiler</td>\n";
  27. } else {
  28. $ct = 1;
  29. }
  30. } elsif($ct && /^CPU time: ([.0-9]*) s user, ([.0-9]*) s system/) {
  31. $time = $1 + $2;
  32. } elsif($ct && /^Pass$/) {
  33. printf "<td>%.02f</td>\n", $time;
  34. $ct = 0;
  35. } elsif($ct && /^Fail$/) {
  36. print "<td>-</td>\n";
  37. $ct = 0;
  38. }
  39. }
  40. print "</tr>\n";
  41. print "</table>\n";
  42. print "</body>\n</html>\n";
粤ICP备19079148号