import fix and plot multiple lines at once
authorAndrew Lenharth <andrewl@lenharth.org>
Wed, 27 Apr 2005 17:32:41 +0000 (17:32 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Wed, 27 Apr 2005 17:32:41 +0000 (17:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21596 91177308-0d34-0410-b5e6-96231b3b80d8

utils/importNLT.pl
utils/plotNLT.pl

index 1511803e817395e8977d3ac9a0e4be84c9a7d111..c1b950dc34d804c98bb376c5f50d810b309841ce 100644 (file)
@@ -23,7 +23,7 @@ while($d = <>)
   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 ca911db26f5dcd0bd031a2081a2d44c2dfb624a7..55d503d68933fad5d1c7e3c73c6d3528f5e102c1 100644 (file)
@@ -14,26 +14,40 @@ $connectionInfo="dbi:mysql:$db;$host";
 # 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";
-
-$query = "Select RUN, VALUE from Tests where TEST = '$test' AND NAME = '$prog' ORDER BY RUN";
-#print $query;
-
-my $sth = $dbh->prepare( $query) || die "Can't prepare statement: $DBI::errstr";;
-
-my $rc = $sth->execute or die DBI->errstr;
+print "\nplot";
+for ($iter = 0; $iter < $count; $iter++) {
+  if ($iter)
+    { print ","; }
+  print " '-' using 1:2 with lines";
+}
 
-while(($da,$v) = $sth->fetchrow_array)
-{
-  print "$da $v\n";
+print "\n";
+
+for ($iter = 0; $iter < $count; $iter++) {
+
+  $prog = shift @ARGV;
+  $test = shift @ARGV;
+
+  $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;