123456789_123456789_123456789_123456789_123456789_

Class: Benchmark

Relationships & Source Files
Inherits: Object
Defined in: activesupport/lib/active_support/core_ext/benchmark.rb

Class Method Summary

Class Method Details

.ms(&block)

Benchmark realtime in milliseconds.

Benchmark.realtime { User.all }
# => 8.0e-05

Benchmark.ms { User.all }
# => 0.074
[ GitHub ]

  
# File 'activesupport/lib/active_support/core_ext/benchmark.rb', line 13

def ms(&block)
  1000 * realtime(&block)
end