From 6e92729e988e5528ee8cd0c034561054d75dc8ff Mon Sep 17 00:00:00 2001 From: Andrew Lenharth Date: Wed, 27 Apr 2005 14:57:26 +0000 Subject: [PATCH] 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 --- utils/importNLT.pl | 26 ++++++++++++++++++++++++++ utils/parseNLT.pl | 8 +++++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 utils/importNLT.pl diff --git a/utils/importNLT.pl b/utils/importNLT.pl new file mode 100644 index 00000000000..a46123b3da1 --- /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 diff --git a/utils/parseNLT.pl b/utils/parseNLT.pl index 3a2e82e1e02..95afca73a13 100644 --- a/utils/parseNLT.pl +++ b/utils/parseNLT.pl @@ -15,12 +15,14 @@ while(<>) if (/([^<]+)<\/td>/) { if ($prefix) - { $output .= "$1 "; } + { $output .= "$1 "; $count++; } } if (/ 3) + { print "\n$day $mon $year $prefix/$output"; } + $output = ""; + $count = 0; } if (/

(Programs.+)<\/h2>/) { -- 2.34.1