1 The following are examples of tcl_calltime.d.
3 This script traces the total elapsed time of different Tcl commands and
4 procedures and prints a report. Here it traces the example program,
8 Tracing... Hit Ctrl-C to end.
24 Top 10 exclusive elapsed times (us),
27 16028 cmd namespace 272
34 16028 cmd after 3025152
37 Top 10 inclusive elapsed times (us),
39 16028 cmd uplevel 1849
40 16028 proc tclInit 2519
41 16028 cmd tclInit 2772
42 16028 proc func_c 1010031
43 16028 cmd func_c 1010088
44 16028 proc func_b 2020059
45 16028 cmd func_b 2020106
46 16028 cmd after 3025152
47 16028 proc func_a 3026545
48 16028 cmd func_a 3026572
50 The output is in three sections. The first shows the top ten most executed
51 commands while the script is tracing.
53 The second (Top 10 exclusive elapsed times) shows us the top ten slowest
54 commands or procedures, this number excludes any subroutines called during
57 The third (Top 10 inclusive elapsed times) shows us the top ten slowest
58 commands or procedures including any time spent in subroutines. You can see
59 that func_a took the most amount of time all up. This makes sense if you
60 compare the code at Code/Tcl/func_abc.tcl with the results.