[llvm-commits] CVS: llvm/utils/importNLT.pl plotNLT.pl
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Wed Apr 27 10:32:58 PDT 2005
Changes in directory llvm/utils:
importNLT.pl updated: 1.2 -> 1.3
plotNLT.pl updated: 1.1 -> 1.2
---
Log message:
import fix and plot multiple lines at once
---
Diffs of the changes: (+26 -12)
importNLT.pl | 2 +-
plotNLT.pl | 36 +++++++++++++++++++++++++-----------
2 files changed, 26 insertions(+), 12 deletions(-)
Index: llvm/utils/importNLT.pl
diff -u llvm/utils/importNLT.pl:1.2 llvm/utils/importNLT.pl:1.3
--- llvm/utils/importNLT.pl:1.2 Wed Apr 27 11:03:01 2005
+++ llvm/utils/importNLT.pl Wed Apr 27 12:32:41 2005
@@ -23,7 +23,7 @@
if (18 == scalar split " ", $d)
{
($day, $mon, $year, $prog, $gccas, $bc, $llccompile, $llcbetacompile, $jitcompile,
- $mc, $gcc, $cbe, $llc, $llcbeta, $jit, $foo1, $foo2, $foo3) = split / /, $d;
+ $mc, $gcc, $cbe, $llc, $llcbeta, $jit, $foo1, $foo2, $foo3) = split " ", $d;
if ($gccas =~ /\d+/)
{
$dbh->do("INSERT INTO Tests (NAME, RUN, TEST, VALUE) VALUES
Index: llvm/utils/plotNLT.pl
diff -u llvm/utils/plotNLT.pl:1.1 llvm/utils/plotNLT.pl:1.2
--- llvm/utils/plotNLT.pl:1.1 Wed Apr 27 11:41:50 2005
+++ llvm/utils/plotNLT.pl Wed Apr 27 12:32:41 2005
@@ -14,26 +14,40 @@
# make connection to database
$dbh = DBI->connect($connectionInfo,$userid,$passwd) or die DBI->errstr;
-$prog = shift @ARGV;
-$test = shift @ARGV;
+
+$count = @ARGV / 2;
print "set xdata time\n";
print 'set timefmt "%Y-%m-%d"';
-print "\nplot '-' using 1:2 with lines \n";
+print "\nplot";
+for ($iter = 0; $iter < $count; $iter++) {
+ if ($iter)
+ { print ","; }
+ print " '-' using 1:2 with lines";
+}
-$query = "Select RUN, VALUE from Tests where TEST = '$test' AND NAME = '$prog' ORDER BY RUN";
-#print $query;
+print "\n";
-my $sth = $dbh->prepare( $query) || die "Can't prepare statement: $DBI::errstr";;
+for ($iter = 0; $iter < $count; $iter++) {
-my $rc = $sth->execute or die DBI->errstr;
+ $prog = shift @ARGV;
+ $test = shift @ARGV;
-while(($da,$v) = $sth->fetchrow_array)
-{
- print "$da $v\n";
+ $query = "Select RUN, VALUE from Tests where TEST = '$test' AND NAME = '$prog' ORDER BY RUN";
+ #print "\n$query\n";
+
+ my $sth = $dbh->prepare( $query) || die "Can't prepare statement: $DBI::errstr";;
+
+ my $rc = $sth->execute or die DBI->errstr;
+
+ while(($da,$v) = $sth->fetchrow_array)
+ {
+ print "$da $v\n";
+ }
+
+ print "e\n";
}
-print "e\n";
# disconnect from database
$dbh->disconnect;
More information about the llvm-commits
mailing list