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
activesupport-6.0.0.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.3 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.3.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.0.beta3 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.2.1 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.0.beta2 lib/active_support/core_ext/benchmark.rb
activesupport-6.0.0.beta1 lib/active_support/core_ext/benchmark.rb
nullifyable-0.1.0 vendor/bundle/gems/activesupport-5.2.2/lib/active_support/core_ext/benchmark.rb
activesupport-5.2.2 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.2.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.1.1 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.1 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.1.rc1 lib/active_support/core_ext/benchmark.rb
monero_wallet_gen-0.1.0 vendor/bundle/ruby/2.3.0/gems/activesupport-5.2.0/lib/active_support/core_ext/benchmark.rb
activesupport-5.2.0 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.0.rc2 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.0.rc1 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.0.beta2 lib/active_support/core_ext/benchmark.rb
activesupport-5.2.0.beta1 lib/active_support/core_ext/benchmark.rb
ruby-on-quails-0.1.0 activesupport/lib/active_support/core_ext/benchmark.rb