diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-06 17:33:11 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-06 17:33:11 +0000 |
commit | f86276b305b88c657f8ec9f853010d33f49907e2 (patch) | |
tree | 70290c9c2efde02749dd96842becec2ad8719b22 /activerecord | |
parent | 291c667d6614ce28f85311f06ceb5f130b903be1 (diff) | |
download | rails-f86276b305b88c657f8ec9f853010d33f49907e2.tar.gz rails-f86276b305b88c657f8ec9f853010d33f49907e2.tar.bz2 rails-f86276b305b88c657f8ec9f853010d33f49907e2.zip |
Fix fragment benchmark calls and limit timings to 5 decimals
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index a6ce28685c..4aedbea322 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -720,7 +720,7 @@ module ActiveRecord #:nodoc: if logger result = nil seconds = Benchmark.realtime { result = use_silence ? silence { yield } : yield } - logger.info "#{title} (#{sprintf("%f", seconds)})" + logger.info "#{title} (#{'%.5f' % seconds)})" result else yield |