We're trying not to double count so we'll typically separate out the child SQL timings.
For example:
SQL> create or replace
2 procedure SLOW_PROC is
3 x int;
4 begin
5 select count(edition_name)
6 into x
7 from dba_objects,dba_tables
8 where object_id > 10;
9 end;
10 /
Procedure created.
SQL> exec slow_proc
PL/SQL procedure successfully completed.
ran for ~1min on my laptop. But the trace shows this:
BEGIN slow_proc; END;
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 2 0.00 0.00 0 0 0 1
Because the time was not spent "in" the proc by the SQL it called:
SELECT COUNT(EDITION_NAME)
FROM
DBA_OBJECTS,DBA_TABLES WHERE OBJECT_ID > 10
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.15 0.16 0 20 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 63.60 63.63 0 36693 0 1
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 3 63.76 63.79 0 36713 0 1
That saves us from reporting at the end of the trace file that we ran for "2 mins" instead of 1.