Permalink
Browse files

add documentation to Benchmark#ms [ci skip]

  • Loading branch information...
1 parent 7755ae7 commit e946c5853b99607cc5fe92225c473a51ecc44e99 Francesco Rodriguez committed Apr 4, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 activesupport/lib/active_support/core_ext/benchmark.rb
@@ -1,6 +1,13 @@
require 'benchmark'
class << Benchmark
+ # Benchmark realtime in milliseconds.
+ #
+ # Benchmark.realtime { User.all }
+ # # => 8.0e-05
+ #
+ # Benchmark.ms { User.all }
+ # # => 0.074
def ms
1000 * realtime { yield }
end

0 comments on commit e946c58

Please sign in to comment.