mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Dont benchmark if the logger has been turned off
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1269 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
dda5070e70
commit
577a22c47e
1 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,8 @@ module ActionView
|
|||
#
|
||||
# Will add something like "Notes section (0.345234)" to the log.
|
||||
def benchmark(message = "Benchmarking", &block)
|
||||
return if @logger.nil?
|
||||
|
||||
bm = Benchmark.measure do
|
||||
block.call
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue