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.16.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.7.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.0 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.0.rc2 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.0.racecar1 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.0.rc1 lib/active_support/core_ext/benchmark.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/core_ext/benchmark.rb
activesupport-5.0.0.beta4 lib/active_support/core_ext/benchmark.rb
activesupport-4.1.15 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.6 lib/active_support/core_ext/benchmark.rb
core_ext-0.0.6 lib/core_ext/benchmark.rb
activesupport-4.1.15.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.6.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-4.1.14.2 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.5.2 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.0.beta3 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.0.beta2 lib/active_support/core_ext/benchmark.rb
activejob-lock-0.0.2 rails/activesupport/lib/active_support/core_ext/benchmark.rb
activesupport-5.0.0.beta1.1 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.5.1 lib/active_support/core_ext/benchmark.rb