1#!/usr/bin/perl -w
2
3# Copyright 2004 Aleksey Gurtovoy
4# Copyright 2001 Jens Maurer
5# Distributed under the Boost Software License, Version 1.0.
6# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7
8use strict;
9
10my $filename;
11my $compiler;
12my $time = 0;
13my $ct = 0;
14my $first = 2;
15
16print "<html>\n<head>\n<title>\nCompile Times</title>\n</head>\n\n";
17print "<body bgcolor=\"#ffffff\" text=\"#000000\">\n";
18print "<img border=\"0\" src=\"boost.png\" width=\"277\" height=\"86\">";
19print "<p>\n";
20print "Compile time for each successful regression test in seconds.\n";
21print "<p>\n";
22
23print "<table border=\"1\">\n";
24print "<tr><td>Test</td>\n";
25
26while(<>) {
27  if(/^\*\*\* (.*) \*\*\*$/) {
28    $filename = $1;
29    $first = ($first == 0 ? 0 : $first-1);
30    if($first == 0) {
31      print "</tr>\n\n<tr align=right>\n<td align=left><a href=\"http://www.boost.org/$filename\">$filename</a></td>\n";
32    }
33  } elsif(/^\*\* (.*)/) {
34    $compiler = $1;
35    if($first) {
36      print "<td>$compiler</td>\n";
37    } else {
38      $ct = 1;
39    }
40  } elsif($ct && /^CPU time: ([.0-9]*) s user, ([.0-9]*) s system/) {
41    $time = $1 + $2;
42  } elsif($ct && /^Pass$/) {
43    printf "<td>%.02f</td>\n", $time;
44    $ct = 0;
45  } elsif($ct && /^Fail$/) {
46    print "<td>-</td>\n";
47    $ct = 0;
48  }
49}
50
51print "</tr>\n";
52print "</table>\n";
53print "</body>\n</html>\n";
54
55