diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-06-08 16:14:38 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-06-08 16:15:14 -0700 |
commit | 38b608ecab2441cd0c4e75bc08bdf57fcf85dd71 (patch) | |
tree | ae901461df0ebe6b065b89a5db201d08fd5dda92 /actionpack/lib/action_controller/abstract/benchmarker.rb | |
parent | a470bb36128cfdddd888492b7ac972ee582f6acb (diff) | |
download | rails-38b608ecab2441cd0c4e75bc08bdf57fcf85dd71.tar.gz rails-38b608ecab2441cd0c4e75bc08bdf57fcf85dd71.tar.bz2 rails-38b608ecab2441cd0c4e75bc08bdf57fcf85dd71.zip |
Writing comments to AbstractController
Diffstat (limited to 'actionpack/lib/action_controller/abstract/benchmarker.rb')
-rw-r--r-- | actionpack/lib/action_controller/abstract/benchmarker.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/abstract/benchmarker.rb b/actionpack/lib/action_controller/abstract/benchmarker.rb index 07294cede3..58e9564c2f 100644 --- a/actionpack/lib/action_controller/abstract/benchmarker.rb +++ b/actionpack/lib/action_controller/abstract/benchmarker.rb @@ -5,6 +5,16 @@ module AbstractController include Logger module ClassMethods + # Execute the passed in block, timing the duration of the block in ms. + # + # ==== Parameters + # title<#to_s>:: The title of block to benchmark + # log_level<Integer>:: A valid log level. Defaults to Logger::DEBUG + # use_silence<TrueClass, FalseClass>:: Whether or not to silence the + # logger for the duration of the block. + # + # ==== Returns + # Object:: The result of the block def benchmark(title, log_level = ::Logger::DEBUG, use_silence = true) if logger && logger.level >= log_level result = nil |