2
#takes a test and a program from a dp and produces a gnuplot script
3
#use like perl plotNLT.pl password Programs/MultiSource/Benchmarks/ASCI_Purple/SMG2000/smg2000 llc
12
$connectionInfo="dbi:mysql:$db;$host";
14
# make connection to database
15
$dbh = DBI->connect($connectionInfo,$userid,$passwd) or die DBI->errstr;
20
print "set xdata time\n";
21
print 'set timefmt "%Y-%m-%d"';
23
for ($iter = 0; $iter < $count; $iter++) {
26
print " '-' using 1:2 with lines";
31
for ($iter = 0; $iter < $count; $iter++) {
36
$query = "Select RUN, VALUE from Tests where TEST = '$test' AND NAME = '$prog' ORDER BY RUN";
39
my $sth = $dbh->prepare( $query) || die "Can't prepare statement: $DBI::errstr";;
41
my $rc = $sth->execute or die DBI->errstr;
43
while(($da,$v) = $sth->fetchrow_array)
52
# disconnect from database