]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/make-cputime-page.pl
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / make-cputime-page.pl
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
8 use strict;
9
10 my $filename;
11 my $compiler;
12 my $time = 0;
13 my $ct = 0;
14 my $first = 2;
15
16 print "<html>\n<head>\n<title>\nCompile Times</title>\n</head>\n\n";
17 print "<body bgcolor=\"#ffffff\" text=\"#000000\">\n";
18 print "<img border=\"0\" src=\"boost.png\" width=\"277\" height=\"86\">";
19 print "<p>\n";
20 print "Compile time for each successful regression test in seconds.\n";
21 print "<p>\n";
22
23 print "<table border=\"1\">\n";
24 print "<tr><td>Test</td>\n";
25
26 while(<>) {
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
51 print "</tr>\n";
52 print "</table>\n";
53 print "</body>\n</html>\n";
54