fix for parse, and a start at db import. Using CVS as scp :)

llvm-svn: 21591
This commit is contained in:
Andrew Lenharth 2005-04-27 14:57:26 +00:00
parent b071bef66a
commit be6ce82937
2 changed files with 31 additions and 3 deletions

26
llvm/utils/importNLT.pl Normal file
View File

@ -0,0 +1,26 @@
#!/usr/bin/perl
#take the output of parseNLT.pl and load it into a database
use DBI;
# database information
$db="llvmalpha";
$host="narya.lenharth.org";
$userid="llvmdbuser";
$passwd=""; #removed for obvious reasons
$connectionInfo="dbi:mysql:$db;$host";
# make connection to database
$dbh = DBI->connect($connectionInfo,$userid,$passwd) or die DBI->errstr;
while($d = <>)
{
if (18 == split / /, $d)
{
($day, $mon, $year, $prog, $gccas, $bc, $llc-compile, $llc-beta-compile, $jit-compile,
$mc, $gcc, $cbe, $llc, $llc-beta, $jit, $foo1, $foo2, $foo3) = split / /, $d;
print ".";
}
}
# disconnect from database
$dbh->disconnect

View File

@ -15,12 +15,14 @@ while(<>)
if (/<td>([^<]+)<\/td>/)
{
if ($prefix)
{ $output .= "$1 "; }
{ $output .= "$1 "; $count++; }
}
if (/<tr/)
{
if ($output)
{ print "\n$day $mon $year $prefix/$output"; $output = ""; }
if ($output and $count > 3)
{ print "\n$day $mon $year $prefix/$output"; }
$output = "";
$count = 0;
}
if (/<h2>(Programs.+)<\/h2>/)
{