hoodwink.d enhanced


Shugo's Ruby-Prof #

by why in inspect

Hot tip from Jeremy Kemper on Ruby-Talk:

The recently-posted ruby-prof extension by Shugo Maeda is absolutely wonderful. Such a simple idea; why did it take so long? It times and counts method calls with very low overhead using clock, gettimeofday, or the CPU timer (on Pentium or PowerPC only). Unfortunely, it requires Ruby 1.8 newer than 2005-03-22, which means CVS, or Ruby 1.9 newer than 2005-03-17.

I started using this yesterday to benchmark Syck and it’s thirty bicycles faster than -rprofile. With the same familiar output.

 ruby -runprof tests/basic.rb

Only at version 0.1, but I demand that you not fret.

said on 06 Apr 2005 at 11:26

I’m using it for a Rails request profiler.

Drop that into your app’s lib directory and enable profiling in a controller:
require_dependency 'request_profiler'
class PoorImpulseController < ApplicationController
Or go ahead and enable it in ApplicationController to profile your whole app. Output is appended to the rendered page.

Comments are closed for this entry.