1

The ruby-prof and pprof.rb libraries is useful but in my mind seem to give alot of unnecessary information (by not letting me filter out all of the rails code). What would be great would be to run a profiler at the class level, like:

simple_profiler -c SomeClass 

and then have a report that starts at that class and works its way through the code and shows you how long (by time or %) and number of calls for each class, each method, and each line. Does something like this exist or should I get started creating this gem? :)

Jeremy Smith
  • 14,727
  • 19
  • 67
  • 114
  • This question was answered for ruby-prof in http://stackoverflow.com/questions/2241491/is-it-possible-to-ignore-irrelevant-methods-when-profiling-ruby-applications – Andrew Grimm Jun 14 '11 at 23:55

1 Answers1

1

I think ruby-prof can eliminate methods, though it was someone else's patch, so I haven't actually ever used it:

https://github.com/rdp/ruby-prof/blob/master/test/method_elimination_test.rb

rogerdpack
  • 62,887
  • 36
  • 269
  • 388
  • I've used it, and it works in eliminating the specified method. I haven't actually checked that all the other values remain consistent. – Andrew Grimm Jun 14 '11 at 23:52