Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of Incl CPU Time, Excl CPU Time, Incl Real CPU Time, Excl Real CPU Time in traceview?

1) Exclusive time is the time spent in the method 2) Inclusive time is the time spent in the method plus the time spent in any called functions 3) We refer to calling methods as "parents" and called methods as "children." Reference Link : Click here

Question here is :

what are difference between

  • Incl CPU Time & Incl Real CPU Time ?
  • Excl CPU Time & Excl Real CPU Time ?

in my one example trace file for Method1() : Incl CPU Time = 242 msec & Incl Real CPU Time = 5012 msec

  • i can not identify reason behind 5012-242 = 4770 msec gap in above both times.

Please help me if you have any idea.

like image 987
VISHAL VIRADIA Avatar asked Apr 02 '13 09:04

VISHAL VIRADIA


2 Answers

Here's the DDMS documentation

Incl CPU time is the inclusive cpu time. It is the sum of the time spent in the function itself, as well as the sum of the times of all functions that it calls.

Excl CPU time is the exclusive cpu time. It is only the time spent in the function itself. You'll notice that it is always the same as the "incl time" of the "self" child.

The documentation doesn't clarify the difference between CPU time and real time, but I agree with Neetesh that CPU time is the time that the function is actually running (this would not include waiting on IO) and the real time is the wall clock time (which would include time spent doing IO).

like image 149
David Avatar answered Oct 12 '22 05:10

David


cpu time is the time for which the process uses the cpu and cpu real time is the total time from the starting of process to end of process it includes waiting time of process to execute.

like image 10
Neetesh Singh Avatar answered Oct 12 '22 06:10

Neetesh Singh