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.2.9.rc2 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.4 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.4.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-4.2.9.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-5.0.3 lib/active_support/core_ext/benchmark.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/activesupport-4.2.8/lib/active_support/core_ext/benchmark.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
lazy_record-0.2.1 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
lazy_record-0.2.0 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
lazy_record-0.1.9 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
lazy_record-0.1.8 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
lazy_record-0.1.7 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
lazy_record-0.1.6 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
lazy_record-0.1.4 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
tdiary-5.0.4 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
lazy_record-0.1.3 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
lazy_record-0.1.2 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
lazy_record-0.1.1 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
lazy_record-0.1.0 vendor/bundle/gems/activesupport-5.0.2/lib/active_support/core_ext/benchmark.rb
activesupport-5.0.2 lib/active_support/core_ext/benchmark.rb