Changeset 8475
- Timestamp:
- 12/22/07 02:15:59 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/request_profiler.rb
r8474 r8475 24 24 n.times do |i| 25 25 run 26 print i % 10 == 0 ? 'x' : '.'27 $stdout.flush26 reset! 27 print_progress(i) 28 28 end 29 29 end … … 42 42 script = File.read(script_path) 43 43 instance_eval "def run; #{script}; end", script_path, 1 44 end 45 46 def print_progress(i) 47 print "\n " if i % 60 == 0 48 print ' ' if i % 10 == 0 49 print '.' 50 $stdout.flush 44 51 end 45 52 end … … 88 95 89 96 def warmup(sandbox) 90 Benchmark.realtime { sandbox.run } 97 Benchmark.realtime do 98 sandbox.run 99 sandbox.reset! 100 end 91 101 end 92 102