diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-18 16:15:43 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-18 17:33:45 -0700 |
commit | 07f733c6315980bde120c98c6b8a25e2773ee6bf (patch) | |
tree | 2b6fce7621af540ee6b4b07388c58cacd3a83481 /actionpack/lib/action_controller/base/chained | |
parent | ee5520a0a5ea83843ce88f6b9550e3c36b8cdd49 (diff) | |
download | rails-07f733c6315980bde120c98c6b8a25e2773ee6bf.tar.gz rails-07f733c6315980bde120c98c6b8a25e2773ee6bf.tar.bz2 rails-07f733c6315980bde120c98c6b8a25e2773ee6bf.zip |
Ported simple benchmarking in new base
Diffstat (limited to 'actionpack/lib/action_controller/base/chained')
-rw-r--r-- | actionpack/lib/action_controller/base/chained/benchmarking.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base/chained/benchmarking.rb b/actionpack/lib/action_controller/base/chained/benchmarking.rb index 66e9e9c31d..57a1ac8314 100644 --- a/actionpack/lib/action_controller/base/chained/benchmarking.rb +++ b/actionpack/lib/action_controller/base/chained/benchmarking.rb @@ -21,7 +21,7 @@ module ActionController #:nodoc: # easy to include benchmarking statements in production software that will remain inexpensive because the benchmark # will only be conducted if the log level is low enough. def benchmark(title, log_level = Logger::DEBUG, use_silence = true) - if logger && logger.level == log_level + if logger && logger.level >= log_level result = nil ms = Benchmark.ms { result = use_silence ? silence { yield } : yield } logger.add(log_level, "#{title} (#{('%.1f' % ms)}ms)") |