From ff83df36a48103675f16152f9d6bf67e11ea9f1a Mon Sep 17 00:00:00 2001 From: Andrey Vakarev Date: Mon, 21 May 2012 19:13:24 +0300 Subject: Refactoring: turn unless/else into if/else --- actionpack/examples/performance.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'actionpack/examples/performance.rb') diff --git a/actionpack/examples/performance.rb b/actionpack/examples/performance.rb index 994e745bb0..8ea4758961 100644 --- a/actionpack/examples/performance.rb +++ b/actionpack/examples/performance.rb @@ -166,15 +166,7 @@ def run_all!(times, verbose) Runner.run(:diff_100, times, verbose) end -unless ENV["PROFILE"] - run_all!(1, false) - - (ENV["M"] || 1).to_i.times do - $ran = [] - run_all!(N, true) - Runner.done - end -else +if ENV["PROFILE"] Runner.run(ENV["PROFILE"].to_sym, 1, false) require "ruby-prof" RubyProf.start @@ -182,4 +174,12 @@ else result = RubyProf.stop printer = RubyProf::CallStackPrinter.new(result) printer.print(File.open("output.html", "w")) +else + run_all!(1, false) + + (ENV["M"] || 1).to_i.times do + $ran = [] + run_all!(N, true) + Runner.done + end end \ No newline at end of file -- cgit v1.2.3