Permalink
Browse files

Update the benchmark runner so it actually works again

  • Loading branch information...
Tony Arcieri
Tony Arcieri committed Sep 24, 2010
1 parent 9974092 commit 83a802ccd1cb007fa85584c46a6b5b93c9b4413e
Showing with 6 additions and 6 deletions.
  1. +6 −6 benchmarks/runner.re
View
@@ -1,14 +1,14 @@
# run benchmarks in Reia and Erlang
started_at = erl.now()
-Main.load("test/test_helper.re")
+System.load("test/test_helper.re")
benchmarks = ["recursion", "sleep", "forloops", "doloops"]
bench_repeat = 10
-Main.puts("Running benchmark tests #{bench_repeat} times each")
+"Running benchmark tests #{bench_repeat} times each".puts()
bench = benchmarks.map do |name|
- Main.load("benchmarks/#{name}_benchmark.re")
+ System.load("benchmarks/#{name}_benchmark.re")
erl_module = "benchmarks/ebin/#{name}_benchmark"
case erl.code.load_abs(erl_module.to_list())
@@ -32,11 +32,11 @@ bench = benchmarks.map do |name|
reia_duration = TestHelper.duration(reia_bench_start, reia_bench_end)
erl_duration = TestHelper.duration(erl_bench_start, erl_bench_end)
ratio = reia_duration / erl_duration
- Main.puts("#{name} Reia:#{reia_duration}s Erlang:#{erl_duration}s that's #{ratio}x slower")
+ "#{name} Reia:#{reia_duration}s Erlang:#{erl_duration}s that's #{ratio}x slower".puts()
end
finished_at = erl.now()
duration = TestHelper.duration(started_at, finished_at)
-Main.puts("\nFinished in #{duration} seconds\n")
-Main.puts("#{bench.size()} benchmarks")
+"\nFinished in #{duration} seconds\n".puts()
+"#{bench.size()} benchmarks".puts()

0 comments on commit 83a802c

Please sign in to comment.