diff options
| author | Andrew Lenharth <andrewl@lenharth.org> | 2005-04-27 16:41:50 +0000 |
|---|---|---|
| committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-04-27 16:41:50 +0000 |
| commit | 438225a8cb53b450c6c8bc2810c531091b759de7 (patch) | |
| tree | 8689af1251f67204eadf9a3b2e59f794e87da8e1 /llvm | |
| parent | e81871331fab74b71e51faac1c4bf5164e7ba890 (diff) | |
| download | bcm5719-llvm-438225a8cb53b450c6c8bc2810c531091b759de7.tar.gz bcm5719-llvm-438225a8cb53b450c6c8bc2810c531091b759de7.zip | |
Generate a gnuplot script for any program and any test (like llc or gcc)
llvm-svn: 21593
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/utils/plotNLT.pl | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/llvm/utils/plotNLT.pl b/llvm/utils/plotNLT.pl new file mode 100644 index 00000000000..ca911db26f5 --- /dev/null +++ b/llvm/utils/plotNLT.pl @@ -0,0 +1,39 @@ +#!/usr/bin/perl +#takes a test and a program from a dp and produces a gnuplot script +#use like perl plotNLT.pl password Programs/MultiSource/Benchmarks/ASCI_Purple/SMG2000/smg2000 llc + +use DBI; + +# database information +$db="llvmalpha"; +$host="localhost"; +$userid="llvmdbuser"; +$passwd=shift @ARGV; +$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; + +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; + +while(($da,$v) = $sth->fetchrow_array) +{ + print "$da $v\n"; +} + +print "e\n"; + +# disconnect from database +$dbh->disconnect; |

