mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-24 04:09:47 +00:00
fix for parse, and a start at db import. Using CVS as scp :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21591 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
85d5f6067d
commit
6e92729e98
26
utils/importNLT.pl
Normal file
26
utils/importNLT.pl
Normal 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
|
@ -15,12 +15,14 @@ while(<>)
|
|||||||
if (/<td>([^<]+)<\/td>/)
|
if (/<td>([^<]+)<\/td>/)
|
||||||
{
|
{
|
||||||
if ($prefix)
|
if ($prefix)
|
||||||
{ $output .= "$1 "; }
|
{ $output .= "$1 "; $count++; }
|
||||||
}
|
}
|
||||||
if (/<tr/)
|
if (/<tr/)
|
||||||
{
|
{
|
||||||
if ($output)
|
if ($output and $count > 3)
|
||||||
{ print "\n$day $mon $year $prefix/$output"; $output = ""; }
|
{ print "\n$day $mon $year $prefix/$output"; }
|
||||||
|
$output = "";
|
||||||
|
$count = 0;
|
||||||
}
|
}
|
||||||
if (/<h2>(Programs.+)<\/h2>/)
|
if (/<h2>(Programs.+)<\/h2>/)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user