[llvm-commits] CVS: llvm/utils/importNLT.pl parseNLT.pl
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Wed Apr 27 07:57:46 PDT 2005
Changes in directory llvm/utils:
importNLT.pl added (r1.1)
parseNLT.pl updated: 1.1 -> 1.2
---
Log message:
fix for parse, and a start at db import. Using CVS as scp :)
---
Diffs of the changes: (+31 -3)
importNLT.pl | 26 ++++++++++++++++++++++++++
parseNLT.pl | 8 +++++---
2 files changed, 31 insertions(+), 3 deletions(-)
Index: llvm/utils/importNLT.pl
diff -c /dev/null llvm/utils/importNLT.pl:1.1
*** /dev/null Wed Apr 27 09:57:37 2005
--- llvm/utils/importNLT.pl Wed Apr 27 09:57:26 2005
***************
*** 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
Index: llvm/utils/parseNLT.pl
diff -u llvm/utils/parseNLT.pl:1.1 llvm/utils/parseNLT.pl:1.2
--- llvm/utils/parseNLT.pl:1.1 Tue Apr 26 21:13:20 2005
+++ llvm/utils/parseNLT.pl Wed Apr 27 09:57:26 2005
@@ -15,12 +15,14 @@
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>/)
{
More information about the llvm-commits
mailing list