class method
self.ms
Ruby on Rails 7.1.6
Since v2.3.18 Last seen in v8.0.4Signature
self.ms(&block)
Benchmark realtime in milliseconds.
Benchmark.realtime { User.all } # => 8.0e-05 Benchmark.ms { User.all } # => 0.074
Parameters
-
blockblock
Source
# File activesupport/lib/active_support/core_ext/benchmark.rb, line 13
def ms(&block)
1000 * realtime(&block)
end
Defined in activesupport/lib/active_support/core_ext/benchmark.rb line 13
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Benchmark