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
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/activesupport-5.0.7.1/lib/active_support/core_ext/benchmark.rb
activesupport-4.2.11.3 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.11.2 lib/active_support/core_ext/benchmark.rb
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/activesupport-4.2.11.1/lib/active_support/core_ext/benchmark.rb
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/activesupport-4.2.11.1/lib/active_support/core_ext/benchmark.rb
activesupport-5.0.7.2 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.11.1 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.7.1 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.11 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.7 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.10 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.10.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.6 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.6.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.5 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.5.rc2 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.5.rc1 lib/active_support/core_ext/benchmark.rb
tdiary-5.0.5 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
activesupport-4.2.9 lib/active_support/core_ext/benchmark.rb