]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - cddl/contrib/dtracetoolkit/Examples/js_calldist_example.txt
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / cddl / contrib / dtracetoolkit / Examples / js_calldist_example.txt
1 The following are examples of running js_calldist.d. 
2
3 Here it is running while the code at Code/JavaScript/func_clock.html is
4 being executed.
5
6 # js_calldist.d
7 Tracing... Hit Ctrl-C to end.
8 ^C
9
10 Elapsed times (us),
11    func_clock.html, obj-new, Date 
12            value  ------------- Distribution ------------- count    
13                4 |                                         0        
14                8 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5        
15               16 |                                         0        
16
17
18 Exclusive function elapsed times (us),
19    func_clock.html, func, setTimeout 
20            value  ------------- Distribution ------------- count    
21               32 |                                         0        
22               64 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5        
23              128 |                                         0        
24
25    func_clock.html, func, getElementById 
26            value  ------------- Distribution ------------- count    
27                4 |                                         0        
28                8 |@@                                       1        
29               16 |@@@@@@@@@@@@@@@@@@                       9        
30               32 |@@@@@@@@@@@@@@@@@@@@                     10       
31               64 |                                         0        
32
33    func_clock.html, func, start 
34            value  ------------- Distribution ------------- count    
35              512 |                                         0        
36             1024 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5        
37             2048 |                                         0        
38
39    func_clock.html, func, func_a 
40            value  ------------- Distribution ------------- count    
41             8192 |                                         0        
42            16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5        
43            32768 |                                         0        
44
45    func_clock.html, func, func_b 
46            value  ------------- Distribution ------------- count    
47            16384 |                                         0        
48            32768 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5        
49            65536 |                                         0        
50
51    func_clock.html, func, func_c 
52            value  ------------- Distribution ------------- count    
53            16384 |                                         0        
54            32768 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5        
55            65536 |                                         0        
56
57
58 Inclusive function elapsed times (us),
59    func_clock.html, func, setTimeout 
60            value  ------------- Distribution ------------- count    
61               32 |                                         0        
62               64 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5        
63              128 |                                         0        
64
65    func_clock.html, func, getElementById 
66            value  ------------- Distribution ------------- count    
67                4 |                                         0        
68                8 |@@                                       1        
69               16 |@@@@@@@@@@@@@@@@@@                       9        
70               32 |@@@@@@@@@@@@@@@@@@@@                     10       
71               64 |                                         0        
72
73    func_clock.html, func, func_c 
74            value  ------------- Distribution ------------- count    
75            16384 |                                         0        
76            32768 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5        
77            65536 |                                         0        
78
79    func_clock.html, func, func_a 
80            value  ------------- Distribution ------------- count    
81            32768 |                                         0        
82            65536 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5        
83           131072 |                                         0        
84
85    func_clock.html, func, func_b 
86            value  ------------- Distribution ------------- count    
87            32768 |                                         0        
88            65536 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5        
89           131072 |                                         0        
90
91    func_clock.html, func, start 
92            value  ------------- Distribution ------------- count    
93            32768 |                                         0        
94            65536 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5        
95           131072 |                                         0        
96
97 The elapsed times show us that the script spent some small amount of time
98 processing various events that were not functions.  In this case there was
99 five new Date objects, and each event took between 8 microseconds and 15 
100 microseconds.
101
102 The exclusive function elapsed times show the time each of our functions
103 takes, excluding the time spent in subroutines called by that function.  We
104 can see in this example that func_a took between 16384 microseconds and 32767
105 microseconds.
106
107 The inclusive function elapsed times show that func_a took between 65536
108 microseconds and 131071 microseconds, including the time spent in any
109 subroutines it calls.
110