Re: dprofpp

2006-01-16 Thread Chris Devers
On Fri, 13 Jan 2006, Gerard Robin wrote:

> And, what are exactly Elapsed Time and User+System Time ?
> 
> If i run time ./dprof1.pl the outputs are:
> 
> real0m0.033s
> user0m0.011s
> sys 0m0.002s
> 
> If i run time ./dprof3.pl the outputs are:
> 
> real0m0.059s
> user0m0.018s
> sys 0m0.004s
> 
> What relation exists between the times of "time" an te times of dprofpp ?

The `times` manpage may help, as might `getrusage`:

http://www.hmug.org/man/3/times.php
http://www.hmug.org/man/2/getrusage.php
http://publib16.boulder.ibm.com/pseries/en_US/libs/basetrf1/getrusage_64.htm

The way that IBM version of the manpage is more oriented towards C 
programmers using the call, but the basic idea still gets through:

This information is read from the calling process as well as from each 
completed child process for which the calling process executed a wait 
subroutine.

tms_utime   The CPU time used for executing instructions in the
user space of the calling process
tms_stime   The CPU time used by the system on behalf of the calling
process.
tms_cutime  The sum of the tms_utime and the tms_cutime values for
all the child processes.
tms_cstime  The sum of the tms_stime and the tms_cstime values for
all the child processes.

Note:
The system measures time by counting clock interrupts. The precision
of the values reported by the times subroutine depends on the rate
at which the clock interrupts occur.

Helpful? 


-- 
Chris Devers
DO NOT LEAVE IT IS NOT REAL

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




dprofpp

2006-01-13 Thread Gerard Robin

Hello,
I am runing an example (in Debbugging Perl of Martin Brown)

there are two scripts which product the same output but one contains
three subroutines and the other only one subroutine.

The outputs:

"3 subroutines"
~~
Total Elapsed Time = 0.199198 Seconds
 User+System Time = 0.029198 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
34.2   0.010  0.009  1   0.0098 0.0092  main::process
0.00   - -0.000  1-  -  warnings::BEGIN
0.00   - -0.000  1-  -  warnings::import
0.00   - -0.000  1-  -  strict::bits
0.00   - -0.000  1-  -  strict::import
0.00   - -0.000  2-  -  main::BEGIN
0.00   - -0.000197-  -  main::add_to_datetime
0.00   - -0.001197-  -  main::process_fields

"1 subroutine"
~
Total Elapsed Time = 0.189979 Seconds
 User+System Time = 0.009979 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
100.   0.010  0.010  1   0.0100 0.0100  warnings::BEGIN
0.00   - -0.000  1-  -  warnings::import
0.00   - -0.000  1-  -  strict::bits
0.00   - -0.000  1-  -  main::process
0.00   - -0.000  1-  -  strict::import
0.00   -  0.010  2- 0.0050  main::BEGIN

the man dprofpp is enough clear, but:

In "1 subroutine" I understand %time 100 %

but in "3 subroutines" I see %time 34.2 in main::process, where are the 65.8 % ?

And, what are exactly Elapsed Time and User+System Time ?

If i run time ./dprof1.pl the outputs are:

real0m0.033s
user0m0.011s
sys 0m0.002s

If i run time ./dprof3.pl the outputs are:

real0m0.059s
user0m0.018s
sys 0m0.004s

What relation exists between the times of "time" an te times of dprofpp ?

tia 
--

GĂ©rard


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>