Permalink
Browse files

Always iterate, to support profiling.

  • Loading branch information...
1 parent 7b2b8bf commit 5aadc53eea060f6ea32bd82352ad44f786e28883 @mdub committed Aug 26, 2011
Showing with 10 additions and 2 deletions.
  1. +10 −2 benchmark/benchmark.rb
View
@@ -98,5 +98,13 @@ def use_to_json
book_data.to_json
end
-action = ARGV.first || "bm"
-puts self.send(action)
+action = ARGV.first
+if action
+ result = nil
+ iterations.times do
+ result = send(action)
+ end
+ puts result
+else
+ bm
+end

0 comments on commit 5aadc53

Please sign in to comment.