[phc-internals] [phc commit] r1189 - trunk/misc

codesite-noreply at google.com codesite-noreply at google.com
Thu Apr 24 15:08:12 IST 2008


Author: paul.biggar
Date: Thu Apr 24 07:07:55 2008
New Revision: 1189

Modified:
   trunk/misc/bench_compare
   trunk/misc/benchmark

Log:
Simplify the benchmark script.
Fix a bug in the name of the output file in bench_compare.


Modified: trunk/misc/bench_compare
==============================================================================
--- trunk/misc/bench_compare	(original)
+++ trunk/misc/bench_compare	Thu Apr 24 07:07:55 2008
@@ -86,6 +86,6 @@

 	
 	file_put_contents ("results/$title.plot", $string);
-	echo `bargraph.pl results/$title.plot > results/title.eps`;
+	echo `bargraph.pl results/$title.plot > results/$title.eps`;

 ?>

Modified: trunk/misc/benchmark
==============================================================================
--- trunk/misc/benchmark	(original)
+++ trunk/misc/benchmark	Thu Apr 24 07:07:55 2008
@@ -44,34 +44,30 @@

 # use long benchmark for -l
 $filename = "test/subjects/3rdparty/benchmarks/zend/bench.php";
-$later_command = "./bench.out";

 if ($opt_long)
 {
 	$filename = "test/subjects/3rdparty/benchmarks/zend/long_bench.php";
-	$later_command = "./long_bench.out";
+	$command = "./long_bench.out";
 }

-
 # which programs to use for testing
-$first_command = "misc/comp -O $filename";
-
 if ($opt_php)
+	$command = "/usr/local/php-opt/bin/php $filename";
+else
 {
-	$first_command = "/usr/local/php-opt/bin/php $filename";
-	$later_command = "/usr/local/php-opt/bin/php $filename";
+	print "Initializing test\n";
+	`misc/comp -O $filename`;
+
+	$command = "./bench.out";
 }


 # run the benchmark
-print "Starting benchmark 0\n";
-$results = `$first_command`;
-process_results ($results);
-
-for ($i = 1; $i < 10; $i++)
+for ($i = 0; $i < 10; $i++)
 {
 	print "Starting benchmark $i: ";
-	$results = `$later_command`;
+	$results = `$command`;
 	process_results ($results);
 	echo "\n";
 }


More information about the phc-internals mailing list