Sha256: 8a63203b2f3977d95b7086c34558abf9a63b3adda77743ecbddf6171bec5c8ee

Contents?: true

Size: 274 Bytes

Versions: 100

Compression:

Stored size: 274 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
    1000 * realtime { yield }
  end
end

Version data entries

100 entries across 91 versions & 12 rubygems

Version Path
mumukit-content-type-1.12.1 vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.6.1/lib/active_support/core_ext/benchmark.rb
mumukit-content-type-1.12.0 vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.6.1/lib/active_support/core_ext/benchmark.rb
activesupport-6.0.6.1 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.6 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.5.1 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.8.1 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.8 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.5 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.4.8 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.7.1 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.7 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.4.7 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.6.3 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.4.6 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.6.2 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.6.1 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.4.5 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.4.4 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.4.3 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.4.2 lib/active_support/core_ext/benchmark.rb