Class | ActionController::RequestProfiler::Sandbox |
In: |
vendor/rails/actionpack/lib/action_controller/request_profiler.rb
|
Parent: | Object |
# File vendor/rails/actionpack/lib/action_controller/request_profiler.rb, line 10 10: def self.benchmark(n, script) 11: new(script).benchmark(n) 12: end
# File vendor/rails/actionpack/lib/action_controller/request_profiler.rb, line 14 14: def initialize(script_path) 15: @quiet = false 16: define_run_method(script_path) 17: reset! 18: end
# File vendor/rails/actionpack/lib/action_controller/request_profiler.rb, line 20 20: def benchmark(n, profiling = false) 21: @quiet = true 22: print ' ' 23: 24: result = Benchmark.realtime do 25: n.times do |i| 26: run(profiling) 27: print_progress(i) 28: end 29: end 30: 31: puts 32: result 33: ensure 34: @quiet = false 35: end