diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2005-04-27 17:32:41 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-04-27 17:32:41 +0000 |
commit | e3142bee52bafa129092663d0fd988455420aea5 (patch) | |
tree | 6ce26dbe9a1dccdb2495932a4c731657cfa820fc /utils/plotNLT.pl | |
parent | e43b3fbb5f21878181278add7a29e2215eccad0d (diff) | |
download | llvm-e3142bee52bafa129092663d0fd988455420aea5.tar.gz llvm-e3142bee52bafa129092663d0fd988455420aea5.tar.bz2 llvm-e3142bee52bafa129092663d0fd988455420aea5.tar.xz |
import fix and plot multiple lines at once
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21596 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/plotNLT.pl')
-rw-r--r-- | utils/plotNLT.pl | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/utils/plotNLT.pl b/utils/plotNLT.pl index ca911db26f..55d503d689 100644 --- a/utils/plotNLT.pl +++ b/utils/plotNLT.pl @@ -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; |