1
0
Fork 0
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:
David Heinemeier Hansson 2005-05-02 07:05:15 +00:00
parent dda5070e70
commit 577a22c47e

View file

@ -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