From 77c2f844244a34acfb089d3fbd6571a141d0d687 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Tue, 18 Dec 2001 22:37:28 +0000 Subject: generating timing HTML page from message log [SVN r12121] --- tools/make-cputime-page.pl | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tools/make-cputime-page.pl (limited to 'tools/make-cputime-page.pl') diff --git a/tools/make-cputime-page.pl b/tools/make-cputime-page.pl new file mode 100644 index 0000000000..2f07b577a2 --- /dev/null +++ b/tools/make-cputime-page.pl @@ -0,0 +1,49 @@ +#!/usr/bin/perl -w + +use strict; + +my $filename; +my $compiler; +my $time = 0; +my $ct = 0; +my $first = 2; + +print "\n\n\nCompile Times\n\n\n"; +print "\n"; +print ""; +print "

\n"; +print "Compile time for each successful regression test in seconds.\n"; +print "

\n"; + +print "\n"; +print "\n"; + +while(<>) { + if(/^\*\*\* (.*) \*\*\*$/) { + $filename = $1; + $first = ($first == 0 ? 0 : $first-1); + if($first == 0) { + print "\n\n\n\n"; + } + } elsif(/^\*\* (.*)/) { + $compiler = $1; + if($first) { + print "\n"; + } else { + $ct = 1; + } + } elsif($ct && /^CPU time: ([.0-9]*) s user, ([.0-9]*) s system/) { + $time = $1 + $2; + } elsif($ct && /^Pass$/) { + printf "\n", $time; + $ct = 0; + } elsif($ct && /^Fail$/) { + print "\n"; + $ct = 0; + } +} + +print "\n"; +print "
Test
$filename$compiler%.02f-
\n"; +print "\n\n"; + -- cgit v1.2.1