summaryrefslogtreecommitdiffstats
path: root/utils/importNLT.pl
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-04-27 14:57:26 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-04-27 14:57:26 +0000
commit6e92729e988e5528ee8cd0c034561054d75dc8ff (patch)
tree1ca78840336fdb3e9b6df551b2eb8fd1e195e18e /utils/importNLT.pl
parent85d5f6067dda05abd079f97fe2c8585128ba7f00 (diff)
downloadexternal_llvm-6e92729e988e5528ee8cd0c034561054d75dc8ff.zip
external_llvm-6e92729e988e5528ee8cd0c034561054d75dc8ff.tar.gz
external_llvm-6e92729e988e5528ee8cd0c034561054d75dc8ff.tar.bz2
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
Diffstat (limited to 'utils/importNLT.pl')
-rw-r--r--utils/importNLT.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/utils/importNLT.pl b/utils/importNLT.pl
new file mode 100644
index 0000000..a46123b
--- /dev/null
+++ b/utils/importNLT.pl
@@ -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