Sha256: cd85bc74cbe3fdd576b1b3a71a57a48403bc80aef4476c3d6dee61c4e2069ed1

Contents?: true

Size: 280 Bytes

Versions: 120

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

120 entries across 114 versions & 17 rubygems

Version Path
activesupport-7.0.3 lib/active_support/core_ext/benchmark.rb
activesupport-7.0.2.4 lib/active_support/core_ext/benchmark.rb
activesupport-6.1.5.1 lib/active_support/core_ext/benchmark.rb
activesupport-6.1.5 lib/active_support/core_ext/benchmark.rb
activesupport-7.0.2.3 lib/active_support/core_ext/benchmark.rb
activesupport-6.1.4.7 lib/active_support/core_ext/benchmark.rb
activesupport-7.0.2.2 lib/active_support/core_ext/benchmark.rb
activesupport-6.1.4.6 lib/active_support/core_ext/benchmark.rb
activesupport-6.1.4.5 lib/active_support/core_ext/benchmark.rb
activesupport-7.0.2.1 lib/active_support/core_ext/benchmark.rb
activesupport-7.0.2 lib/active_support/core_ext/benchmark.rb
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/core_ext/benchmark.rb
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/core_ext/benchmark.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/activesupport-6.1.4.4/lib/active_support/core_ext/benchmark.rb
activesupport-7.0.1 lib/active_support/core_ext/benchmark.rb
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/core_ext/benchmark.rb
activesupport-7.0.0 lib/active_support/core_ext/benchmark.rb
activesupport-6.1.4.4 lib/active_support/core_ext/benchmark.rb
activesupport-7.0.0.rc3 lib/active_support/core_ext/benchmark.rb
activesupport-6.1.4.3 lib/active_support/core_ext/benchmark.rb