On Tue, 29 Jan 2002, James Edward Gray II wrote:

> My Programming Perl book says that profiling results should be forgiven 
> some inaccuracies, but these numbers don't even seem close.  Can 
> somebody explain that top function below to me?  An average call time of 
> 0.0002 times 175353 calls doesn't get anywhere near 4000 seconds the way 
> I do math.  What am I not getting here?
> 
> Total Elapsed Time = 3810.790 Seconds
>    User+System Time = 3800.240 Seconds
> Exclusive Times
> %Time ExclSec CumulS #Calls sec/call Csec/c  Name
>   110.   4204. 3956.0 175353   0.0002 0.0002  General::match
> [[[ snip ]]]

How exactly did you generate this? The top command? If so, what were the
command line parameters that you fed to it?  

Does a %Time greater than 100 make any sense? 

I'm not sure what to make of this output (obviously :), but I'd guess that
for any ratio like you have in fields 5 and 6, the fifth significant digit
could have some error in it. In any event, if you do the math the way it
seems to have been done here, you get:

    >>> ExclSec = 4204.0 
    >>> CumulS = 175353
    >>> secPERcall = ExclSec / CumulS
    >>> print secPERcall
    0.0239744971572

....which is off by 100, but then the C in Csec might mean 100, so...

....okay this probably didn't help at all, sorry...


-- 
Chris Devers

"People with machines that think, will in times of crisis, 
make up stuff and attribute it to me" - "Nikla-nostra-debo"

Reply via email to