Andrew Lenharth | be6ce82 | 2005-04-27 14:57:26 +0000 | [diff] [blame^] | 1 | #!/usr/bin/perl |
| 2 | #take the output of parseNLT.pl and load it into a database |
| 3 | |
| 4 | use DBI; |
| 5 | |
| 6 | # database information |
| 7 | $db="llvmalpha"; |
| 8 | $host="narya.lenharth.org"; |
| 9 | $userid="llvmdbuser"; |
| 10 | $passwd=""; #removed for obvious reasons |
| 11 | $connectionInfo="dbi:mysql:$db;$host"; |
| 12 | |
| 13 | # make connection to database |
| 14 | $dbh = DBI->connect($connectionInfo,$userid,$passwd) or die DBI->errstr; |
| 15 | |
| 16 | while($d = <>) |
| 17 | { |
| 18 | if (18 == split / /, $d) |
| 19 | { |
| 20 | ($day, $mon, $year, $prog, $gccas, $bc, $llc-compile, $llc-beta-compile, $jit-compile, |
| 21 | $mc, $gcc, $cbe, $llc, $llc-beta, $jit, $foo1, $foo2, $foo3) = split / /, $d; |
| 22 | print "."; |
| 23 | } |
| 24 | } |
| 25 | # disconnect from database |
| 26 | $dbh->disconnect |