diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-02 07:05:15 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-02 07:05:15 +0000 |
commit | 577a22c47ea43365a81a92fc5ca20dd86c146ba7 (patch) | |
tree | 28185c40c5605b9faee4637a94c1ae4d7e71adfb | |
parent | dda5070e70f6251b0ab61ee43f8561abe2f5b6b9 (diff) | |
download | rails-577a22c47ea43365a81a92fc5ca20dd86c146ba7.tar.gz rails-577a22c47ea43365a81a92fc5ca20dd86c146ba7.tar.bz2 rails-577a22c47ea43365a81a92fc5ca20dd86c146ba7.zip |
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
-rw-r--r-- | actionpack/lib/action_view/helpers/benchmark_helper.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/benchmark_helper.rb b/actionpack/lib/action_view/helpers/benchmark_helper.rb index ee1f88be82..126f505a98 100644 --- a/actionpack/lib/action_view/helpers/benchmark_helper.rb +++ b/actionpack/lib/action_view/helpers/benchmark_helper.rb @@ -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 |