mirror of
https://github.com/github/rails.git
synced 2026-02-17 01:21:42 -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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user