From 577a22c47ea43365a81a92fc5ca20dd86c146ba7 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 2 May 2005 07:05:15 +0000 Subject: 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 --- actionpack/lib/action_view/helpers/benchmark_helper.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionpack/lib/action_view') 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 -- cgit v1.2.3