Request profiler resets after warmup and each run so you don't have to do it in your session script.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8475 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper
2007-12-22 02:15:59 +00:00
parent a7027a94d4
commit c9d313dc22

View File

@@ -23,8 +23,8 @@ module ActionController
result = Benchmark.realtime do
n.times do |i|
run
print i % 10 == 0 ? 'x' : '.'
$stdout.flush
reset!
print_progress(i)
end
end
puts
@@ -42,6 +42,13 @@ module ActionController
script = File.read(script_path)
instance_eval "def run; #{script}; end", script_path, 1
end
def print_progress(i)
print "\n " if i % 60 == 0
print ' ' if i % 10 == 0
print '.'
$stdout.flush
end
end
@@ -87,7 +94,10 @@ module ActionController
end
def warmup(sandbox)
Benchmark.realtime { sandbox.run }
Benchmark.realtime do
sandbox.run
sandbox.reset!
end
end
def default_options