views:

461

answers:

3

Hi,

I am looking to understand conceptually what all goes in profiling a ruby or ruby on rails program (e.g. memory usage, speed of request dispatching, speed of connecting with external programs like DB) and what are the best tools (at a conceptual and fundamental level) that are available

Thanks

+2  A: 

I don't know if it helps, but I read somewhere article saying, that Java is the best profiler for Ruby on Rails applications. The idea was to run them on JRuby and use JProfiler or other Java profiling tools to profile your Rails application. Another possibility that I know of might be the Relic RPM, commercial application especially for profiling Rails applications.

Gabriel Ščerbák
That's an interesting idea. I suppose, by that logic, if you could get Rails running on IronRuby, you could then use some of the .NET profiling tools.
jerhinesmith
+1 for http://www.newrelic.com/
floyd
+1  A: 

If you program on a Mac, you might want to check out DTrace.

I personally use linux at the moment, so I can't speak to it's worth, but I've seen it mentioned quite a few times in various Rails books.

It was originally developed by Sun to run on Solaris, but I believe it now comes pre-installed on Mac OS X Leopard.

jerhinesmith
+1  A: 

You should look at Joe Damato's memory-profiler for Ruby

Also worth looking at is his ltrace patch

Mark Carey