Satya's blog - Rails code profiler

Dec 27 2009 17:02 Rails code profiler

At last, a simple easy to use profiling option:

require 'profiler'
Profiler__::start_profile
do_stuff
Profiler__::stop_profile
Profiler__::print_profile($stderr)

Yay! Bog-slow, though. Without the profiling, the code ran in about 15 seconds. With profiling, 8 minutes! And then all I get is a dump of internal ruby functions getting called. I need to know which of *my* functions are slow. Oh, well.

Tag: rails