Sha256: cd85bc74cbe3fdd576b1b3a71a57a48403bc80aef4476c3d6dee61c4e2069ed1

Contents?: true

Size: 280 Bytes

Versions: 115

Compression:

Stored size: 280 Bytes

Contents

# frozen_string_literal: true

require "benchmark"

class << Benchmark
  # Benchmark realtime in milliseconds.
  #
  #   Benchmark.realtime { User.all }
  #   # => 8.0e-05
  #
  #   Benchmark.ms { User.all }
  #   # => 0.074
  def ms(&block)
    1000 * realtime(&block)
  end
end

Version data entries

115 entries across 109 versions & 15 rubygems

Version Path
activesupport-7.2.2 lib/active_support/core_ext/benchmark.rb
activesupport-7.1.5 lib/active_support/core_ext/benchmark.rb
activesupport-7.2.1.2 lib/active_support/core_ext/benchmark.rb
activesupport-7.1.4.2 lib/active_support/core_ext/benchmark.rb
activesupport-7.0.8.6 lib/active_support/core_ext/benchmark.rb
activesupport-6.1.7.10 lib/active_support/core_ext/benchmark.rb
activesupport-6.1.7.9 lib/active_support/core_ext/benchmark.rb
activesupport-7.2.1.1 lib/active_support/core_ext/benchmark.rb
activesupport-7.1.4.1 lib/active_support/core_ext/benchmark.rb
activesupport-7.0.8.5 lib/active_support/core_ext/benchmark.rb
activesupport-7.1.4 lib/active_support/core_ext/benchmark.rb
activesupport-7.2.1 lib/active_support/core_ext/benchmark.rb
activesupport-7.2.0 lib/active_support/core_ext/benchmark.rb
activesupport-7.2.0.rc1 lib/active_support/core_ext/benchmark.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8.4/lib/active_support/core_ext/benchmark.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.4/lib/active_support/core_ext/benchmark.rb
activesupport-7.2.0.beta3 lib/active_support/core_ext/benchmark.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/benchmark.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/benchmark.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/activesupport-7.0.5.1/lib/active_support/core_ext/benchmark.rb