On 06.06.2008 21:29, Justin To wrote:
> Hello, I'm looking for a program to profile my non-rails ruby program...
> I found ruby-prof, can that do the job? if it does, I have no idea how
> to install and run it to profile my programs =(

There is also "-r profile" (no gem needed):

robert@fussel ~
$ ruby -r profile -e '10.times {|i| puts i}'
0
1
2
3
4
5
6
7
8
9
   %   cumulative   self              self     total
  time   seconds   seconds    calls  ms/call  ms/call  name
   0.00     0.00      0.00       10     0.00     0.00  Kernel.puts
   0.00     0.00      0.00       10     0.00     0.00  Fixnum#to_s
   0.00     0.00      0.00        1     0.00     0.00  Integer#times
   0.00     0.00      0.00       20     0.00     0.00  IO#write
   0.00     0.01      0.00        1     0.00    10.00  #toplevel

Kind regards

	robert