aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/console_profile.rb
blob: afec28795d7b3f488ca7f1a593d4525890817143 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                 
# No GC nonsense.
GC.disable

# Try to load the ruby-prof extension; fail back to the pure-Ruby
# profiler included in the standard library.
begin
  require 'prof'
  Prof.clock_mode = Prof::CPU
  puts 'Using the fast ruby-prof extension'
  require 'unprof'
rescue LoadError
  puts 'Using the slow pure-Ruby profiler'
  require 'profile'
end