Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Generate Ruby Profiling Charts With Perftools

By Peter Cooper / June 17, 2009

  perftools.png

Ilya Grigorik has written an interesting article called Profiling Ruby with Google's Perftools about using a port of Google's Perftools (perftools.rb) to build graphs showing the results of profiling sessions on your Ruby code. As with all of Ilya's great posts, it's punchy and to the point.

Ilya starts by explaining what Perftools is and shows how to use its regular profiling features from Ruby, which are impressive enough, but then moves on to showing how to generate graphic profiling charts that graphically demonstrate where your application is spending most of its time. Aman Gupta, the developer of Perftools.rb, has produced such graphs for RubyGems, Merb, Rails, and EventMachine, which you might find interesting. Unsurprisingly, Rails and Merb apps seem to spend most of their time at the IO stage.

ruby-job.jpgJob! Interkonect, a web app consultancy in Nottingham, UK, is looking for a part-time junior Rails developer - working from home/freelancing is fine but you should be in the UK in order to attend occasional meetings. Click here to learn more.

Comments

  1. roger says:

    Just for ease of reference, here's a link to a ruby 1.9 output using gprof [since Aman's perftools doesn't work with 1.9 yet, it could be interesting].

  2. roger says:

    http://github.com/hogelog/ruby-1.9.1-p0/tree/ee0f53e2559af9b564176f000ec4cd35e01ec06a/sample/_gprof_out

Other Posts to Enjoy

Twitter Mentions