diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-09-05 14:58:34 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-09-05 14:58:34 +0200 |
commit | 227ee2ecb46f1609938a83ed82abde1a45ebe2eb (patch) | |
tree | 49e523792a1446a9b5dd1416489ed5af666f0a9b /actionpack/lib/action_view | |
parent | de0e7507de826bf77fd57cc2a51e27388cb62ff7 (diff) | |
download | rails-227ee2ecb46f1609938a83ed82abde1a45ebe2eb.tar.gz rails-227ee2ecb46f1609938a83ed82abde1a45ebe2eb.tar.bz2 rails-227ee2ecb46f1609938a83ed82abde1a45ebe2eb.zip |
Use a more sensible resolution on the new millisecond benchmarks
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/benchmark_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/benchmark_helper.rb b/actionpack/lib/action_view/helpers/benchmark_helper.rb index 2401338896..bd72cda700 100644 --- a/actionpack/lib/action_view/helpers/benchmark_helper.rb +++ b/actionpack/lib/action_view/helpers/benchmark_helper.rb @@ -15,7 +15,7 @@ module ActionView # <%= expensive_files_operation %> # <% end %> # - # That would add something like "Process data files (345.23ms)" to the log, + # That would add something like "Process data files (345.2ms)" to the log, # which you can then use to compare timings when optimizing your code. # # You may give an optional logger level as the second argument @@ -23,7 +23,7 @@ module ActionView def benchmark(message = "Benchmarking", level = :info) if controller.logger seconds = Benchmark.realtime { yield } - controller.logger.send(level, "#{message} (#{'%.2f' % (seconds * 1000)}ms)") + controller.logger.send(level, "#{message} (#{'%.1f' % (seconds * 1000)}ms)") else yield end |