Sha256: bddc8779a0ac221611788551a7b462dc69727eef3115eed8ef1e3132a955dbd7

Contents?: true

Size: 243 Bytes

Versions: 189

Compression:

Stored size: 243 Bytes

Contents

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
end

Version data entries

189 entries across 181 versions & 19 rubygems

Version Path
activesupport-4.1.14.1 lib/active_support/core_ext/benchmark.rb
core_ext-0.0.5 lib/core_ext/benchmark.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/core_ext/benchmark.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/core_ext/benchmark.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/core_ext/benchmark.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/core_ext/benchmark.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5/lib/active_support/core_ext/benchmark.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/core_ext/benchmark.rb
core_ext-0.0.4 lib/core_ext/benchmark.rb
activesupport-5.0.0.beta1 lib/active_support/core_ext/benchmark.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/core_ext/benchmark.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/core_ext/benchmark.rb
core_ext-0.0.3 lib/core_ext/benchmark.rb
core_ext-0.0.2 lib/core_ext/benchmark.rb
core_ext-0.0.1 lib/core_ext/benchmark.rb
activesupport-4.1.14 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.5 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.5.rc2 lib/active_support/core_ext/benchmark.rb
activesupport-4.1.14.rc2 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.5.rc1 lib/active_support/core_ext/benchmark.rb