Text archives Help
- From: abe@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r609 - branches/itanium2/StandAlone
- Date: Sun, 9 Oct 2005 20:49:22 -0600 (MDT)
Author: abe
Date: Sun Oct 9 20:49:22 2005
New Revision: 609
Modified:
branches/itanium2/StandAlone/manta_path_plot.pl
Log:
Added more options to benchmark script
Modified: branches/itanium2/StandAlone/manta_path_plot.pl
==============================================================================
--- branches/itanium2/StandAlone/manta_path_plot.pl (original)
+++ branches/itanium2/StandAlone/manta_path_plot.pl Sun Oct 9 20:49:22
2005
@@ -83,108 +83,142 @@
print HTML "<h1>$title</h1>\n";
print HTML "Generated using:<br><font face=\"courier\"
size=-1>manta_path_plot.pl " . join(" ",@ARGV) . "</font><p>\n";
-# Form the camera path command.
-$path_command = " -ui \"camerapath( -file $path_file -sync $path_sync
-behavior exit -warmup $path_warmup ";
-if ($path_t != 0) {
- $path_command = $path_command . "-delta_t $path_t ";
-}
-if ($path_time != 0) {
- $path_command = $path_command . "-delta_time $path_time ";
-}
-if ($path_start != 0) {
- $path_command = $path_command . "-interval $path_start $path_last ";
-}
-
-$path_command = $path_command . ")\"";
-
# Read in manta commands.
$line = 0;
while (<INPUT>) {
- $min_fps = 999;
- $max_fps = 0;
- $total_fps = 0;
- $total_samples = 0;
-
- $out_file = $output_prefix . $line . ".temp";
-
- chomp($_);
- $command = $_ . $path_command; # . ">& /dev/null";
-
- # Open a temporary output file.
- if (!open( TEMP, ">", $out_file )) {
- print "Could not open temp out file: $out_file\n";
- exit(1);
- }
+ $input_line = $_;
- # Open a pipe to manta.
- if (!open( MANTA, "-|", $command )) {
- print "Could not execute line $line: $command\n";
- exit(1);
+ # Check for a plot command.
+ if (/^plot:(.*)/) {
+
+ @plot_args = split(/ /,$1);
+ for ($i=0;$i<@plot_args;++$i) {
+
+ if ($plot_args[$i] eq "-path") {
+ $path_file = $plot_args[++$i];
+ }
+ elsif ($plot_args[$i] eq "-sync") {
+ $path_sync = $plot_args[++$i];
+ }
+ elsif ($plot_args[$i] eq "-delta_t") {
+ $path_t = $plot_args[++$i];
+ }
+ elsif ($plot_args[$i] eq "-delta_time") {
+ $path_time = $plot_args[++$i];
+ }
+ elsif ($plot_args[$i] eq "-interval") {
+ $path_start = $plot_args[++$i];
+ $path_last = $plot_args[++$i];
+ }
+ elsif ($plot_args[$i] eq "-warmup") {
+ $path_warmup = $plot_args[++$i];
+ }
+ }
}
- push(@command_array, $command);
+ # Otherwise process the line as a command.
+ else {
- # Wait for input
- while (<MANTA>) {
- chomp;
- @column = split(/ /);
-
- # print ("Frame: $column[0] fps: $column[4]\n");
- print TEMP $column[0] . " " . $column[4] . "\n";
-
- # Keep track of min and max.
- if ($column[4] < $min_fps) {
- $min_fps = $column[4];
+ # Form the camera path command.
+ $path_command = " -ui \"camerapath( -file $path_file -sync
$path_sync -behavior exit -warmup $path_warmup ";
+ if ($path_t != 0) {
+ $path_command = $path_command . "-delta_t $path_t ";
+ }
+ if ($path_time != 0) {
+ $path_command = $path_command . "-delta_time $path_time ";
}
- if ($column[4] > $max_fps) {
- $max_fps = $column[4];
+ if ($path_start != 0) {
+ $path_command = $path_command . "-interval $path_start
$path_last ";
}
- # Keep track of average.
- $total_fps = $total_fps + $column[4];
- $total_samples++;
- }
+ $path_command = $path_command . ")\"";
- # Close the file handles.
- close(MANTA);
- close(TEMP);
-
- # Pipe commands to gnuplot.
- if (!open(GNUPLOT, "|-", "gnuplot")) {
- print "Could not open gnuplot\n";
- exit(1);
- }
+ # Record stat's on the run.
+ $min_fps = 999;
+ $max_fps = 0;
+ $total_fps = 0;
+ $total_samples = 0;
+
+ $out_file = $output_prefix . $line . ".temp";
+
+ chomp($input_line);
+ $command = $input_line . $path_command; # . ">& /dev/null";
+
+ # Open a temporary output file.
+ if (!open( TEMP, ">", $out_file )) {
+ print "Could not open temp out file: $out_file\n";
+ exit(1);
+ }
- $png_file = $output_prefix . $line . ".png";
-
- print GNUPLOT "set data style linespoints\n";
- print GNUPLOT "set term png small color\n";
- print GNUPLOT "set xlabel \"Frame Number\"\n";
- print GNUPLOT "set ylabel \"fps\"\n";
- print GNUPLOT "set title \"$input_file command $line\"\n";
- print GNUPLOT "set output \"$png_file\"\n";
- print GNUPLOT "plot \"$out_file\" using 1:2 title \"fps\"\n";
-
- close(GNUPLOT);
-
- # Output to html file.
- print HTML "<h2>\"$input_file\" command line $line</h2>\n";
- print HTML "<font face=\"courier\" size=-1>$command</font><br>\n";
- print HTML "<img src=\"$png_file\" /><br><pre>\n";
- print HTML "Min fps: $min_fps\n";
- print HTML "Max fps: $max_fps\n";
- print HTML "Median fps: " . (($min_fps+$max_fps)/2) . "\n";
- print HTML "Mean fps: " . ($total_fps / $total_samples) . "</pre>\n";
- print HTML "<hr width=100%><p>\n";
+ # Open a pipe to manta.
+ if (!open( MANTA, "-|", $command )) {
+ print "Could not execute line $line: $command\n";
+ exit(1);
+ }
- push(@out_array,$out_file);
+ push(@command_array, $command);
- ++$line;
-}
+ # Wait for input
+ while (<MANTA>) {
+ chomp;
+ @column = split(/ /);
+
+ # print ("Frame: $column[0] fps: $column[4]\n");
+ print TEMP $column[0] . " " . $column[4] . "\n";
+
+ # Keep track of min and max.
+ if ($column[4] < $min_fps) {
+ $min_fps = $column[4];
+ }
+ if ($column[4] > $max_fps) {
+ $max_fps = $column[4];
+ }
+
+ # Keep track of average.
+ $total_fps = $total_fps + $column[4];
+ $total_samples++;
+ }
+
+ # Close the file handles.
+ close(MANTA);
+ close(TEMP);
+
+ # Pipe commands to gnuplot.
+ if (!open(GNUPLOT, "|-", "gnuplot")) {
+ print "Could not open gnuplot\n";
+ exit(1);
+ }
+
+ $png_file = $output_prefix . $line . ".png";
+
+ print GNUPLOT "set data style linespoints\n";
+ print GNUPLOT "set term png small color\n";
+ print GNUPLOT "set xlabel \"Frame Number\"\n";
+ print GNUPLOT "set ylabel \"fps\"\n";
+ print GNUPLOT "set title \"$input_file command $line\"\n";
+ print GNUPLOT "set output \"$png_file\"\n";
+ print GNUPLOT "plot \"$out_file\" using 1:2 title \"fps\"\n";
+
+ close(GNUPLOT);
+
+ # Output to html file.
+ print HTML "<h2>\"$input_file\" command line $line</h2>\n";
+ print HTML "<font face=\"courier\" size=-1>$command</font><br>\n";
+ print HTML "<img src=\"$png_file\" /><br><pre>\n";
+ print HTML "Min fps: $min_fps\n";
+ print HTML "Max fps: $max_fps\n";
+ print HTML "Median fps: " . (($min_fps+$max_fps)/2) . "\n";
+ print HTML "Mean fps: " . ($total_fps / $total_samples) .
"</pre>\n";
+ print HTML "<hr width=100%><p>\n";
+ push(@out_array,$out_file);
+ ++$line;
+ }
+
+}
# Create a graph with all results.
# Pipe commands to gnuplot.
- [MANTA] r609 - branches/itanium2/StandAlone, abe, 10/09/2005
Archive powered by MHonArc 2.6.16.