benchmarks/Rakefile
branchdevelopment
changeset 2579 147986458348
parent 2576 66d0effca1fd
child 2598 94ae3f5f4df1
--- a/benchmarks/Rakefile	Thu May 02 10:32:02 2013 +0100
+++ b/benchmarks/Rakefile	Thu May 02 13:50:16 2013 +0100
@@ -52,9 +52,13 @@
 RESULTS_LAST_CSV="result.csv"
 RESULTS_LOG="results-log.txt"
 
+# Make sure it is 32bit JVM!!!
+JAVA_HOME=ENV['JAVA_HOME'] || "/usr/lib/jvm/java-1.6.0-openjdk-i386"
+JAVA="#{JAVA_HOME}/bin/java"
+
 # Defines how many times given benchmark is run. The minimal value
 # is then taken. 
-BENCHMARK_RUNS=5
+BENCHMARK_RUNS=Integer(ENV["RUNS"] || "5")
 
 task :default => [:all]
 
@@ -158,9 +162,9 @@
 # If bench fails (non-zero status value), raise an exception. 
 def measure_single(test, passes, platform)
        if (platform == :'jvm') 
-          command = "java stx.libjava.benchmarks.#{test} #{passes}" 
+          command = "#{JAVA} stx.libjava.benchmarks.#{test} #{passes}" 
        elsif (platform == :'jvmint') 
-          command = "java -Xint stx.libjava.benchmarks.#{test} #{passes}" 
+          command = "#{JAVA} -Xint stx.libjava.benchmarks.#{test} #{passes}" 
        elsif (platform == :'stx')
           command = "./benchmark-runner.sh --smalltalk -b #{test} -n #{passes} 2>&1"
        elsif (platform == :'libjava')