From: Charlie Savage Date: 2006-08-02T07:44:29+09:00 Subject: Re: Better profiling for ruby? Hi Daniel, Good point on making prime.rb available on line - here it is: http://cfis.savagexi.com/pages/prime.rb I also updated my blog entry. Anyway, graph profiles definitely take some getting used to. But they answer the question you had - given a particular hotspot in the code how does that code get executed (what methods call it, what methods does it call). I wrote up some documentation via Rdoc, but another great source of information is doing a search for GProf tutorials. As far as SmallProf, I've never used it. What do you like about it? Thanks, Charlie Daniel Martin wrote: > Charlie Savage writes: > >> The graph profile output will show you what you want. Here is an example: >> >> http://ruby-prof.rubyforge.org/graph.html > > While I have no doubt that it shows me something, I had no idea what > that might be until I tracked down prime.rb in the source - if this is > supposed to be readable without access to the code being tested, I > don't understand. (And if it isn't supposed to be readable without > looking at the test source, why is it so hard to find that source > file? I shouldn't have to download the distribution to be able to > read the documentation.) > > Now that I've seen the source, and gone over what it says in > graph.txt, I have a slightly better idea. This might indeed be able > to tell me something; I'll have to try it thw next time I'm trying to > optimize ruby. > > It'd still be nice to have something like perl's Devel::SmallProf, but > I think I can live without that for a bit. > >