3 ms·
Why not just go straight for ruby-prof? You can use it to instrument discrete sections of code or whole programs, and you can dump the results to things like ca
by cheald 13y ago
Why not just go straight for ruby-prof? You can use it to instrument discrete sections of code or whole programs, and you can dump the results to things like cachegrind format, making comprehensive performance analysis of your code extremely easy.
- nate 13y agoThat's a good question. I've used ruby-prof before, but for me that requires a cognitive load and steps I don't always want to preform in many situations. This just seems simpler. Install gem, sprinkle tb's in my code, and oh there is that dumb block of code I hacked together that doesn't perform very well.
- cheald 13y agoI'm putting together a blog post. :) That said, https://github.com/justinweiss/request_profiler https://github.com/justinweiss/request_profiler is as simple as a Gemfile line and request parameter, and gives you far deeper introspection of your code.
- cheald 13y agoThe blog post, as promised: http://coffeepowered.net/2013/08/02/ruby-prof-for-rails/ http://coffeepowered.net/2013/08/02/ruby-prof-for-rails/