aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-09-06 17:33:11 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-09-06 17:33:11 +0000
commitf86276b305b88c657f8ec9f853010d33f49907e2 (patch)
tree70290c9c2efde02749dd96842becec2ad8719b22 /activerecord/lib
parent291c667d6614ce28f85311f06ceb5f130b903be1 (diff)
downloadrails-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/lib')
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
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