"Jim Freeze" <jim / freeze.org> schrieb im Newsbeitrag
news:20030422060323.B40269 / freeze.org...
> On Tuesday, 22 April 2003 at 18:12:34 +0900, Robert Klemme wrote:
> > Administrator@BOND ~/bin/test
> > $ ruby -r profile rx-test.rb
> >   %   cumulative   self              self     total
> >  time   seconds   seconds    calls  ms/call  ms/call  name
> >  33.74     1.65      1.65        3   550.00  1630.33  Fixnum#times
> >  21.80     2.72      1.07    10000     0.11     0.14
Object#testGlobal
> >  19.59     3.67      0.96    10000     0.10     0.13
Object#testConstant
> >  12.72     4.30      0.62    20000     0.03     0.03  Regexp#=~
> >  12.17     4.89      0.60    10000     0.06     0.06
Object#testDirect
> >
> > What bugs me is that "cumulative seconds" of Fixnum#times is the same
as
> > "self seconds".  I'd think that cumulative should differ since the
blocks
> > are called from the body of times.  In this case I'd expect something
like
> > 4,89099 seconds for cumulative of Fixnum#times.
>
> I think that 'self seconds' and 'cumulative seconds' are equal for
> the first item in the list because before that (not shown) 'cumulative
seconds'
> is equal to zero. Adding 1.07 to 1.65 yields 2.72, the value for
> 'cumulative seconds' on the second line.

Ah, I see.  So times from the third column are cumulated through the
printout list and not along the call chain - which is what I suspected.
Thanks a lot!

Regards

    robert