1 The following are examples of js_cpudist.d.
3 This script traces the on-CPU time of JavaScript functions and prints a report
4 in the form of a histogram. Here it traces the example program,
5 Code/JavaScript/func_clock.html
8 Tracing... Hit Ctrl-C to end.
12 func_clock.html, obj-new, Date
13 value ------------- Distribution ------------- count
15 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
19 Exclusive function on-CPU times (us),
20 func_clock.html, func, setTimeout
21 value ------------- Distribution ------------- count
23 32 |@@@@@@@@@@@@@@@@@@@@ 2
24 64 |@@@@@@@@@@@@@@@@@@@@ 2
27 func_clock.html, func, getElementById
28 value ------------- Distribution ------------- count
32 32 |@@@@@@@@@@@@@@@@@@@@ 8
35 func_clock.html, func, start
36 value ------------- Distribution ------------- count
38 512 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
41 func_clock.html, func, func_a
42 value ------------- Distribution ------------- count
44 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
47 func_clock.html, func, func_b
48 value ------------- Distribution ------------- count
50 32768 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
53 func_clock.html, func, func_c
54 value ------------- Distribution ------------- count
56 32768 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
60 Inclusive function on-CPU times (us),
61 func_clock.html, func, setTimeout
62 value ------------- Distribution ------------- count
64 32 |@@@@@@@@@@@@@@@@@@@@ 2
65 64 |@@@@@@@@@@@@@@@@@@@@ 2
68 func_clock.html, func, getElementById
69 value ------------- Distribution ------------- count
73 32 |@@@@@@@@@@@@@@@@@@@@ 8
76 func_clock.html, func, func_c
77 value ------------- Distribution ------------- count
79 32768 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
82 func_clock.html, func, func_a
83 value ------------- Distribution ------------- count
85 65536 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
88 func_clock.html, func, func_b
89 value ------------- Distribution ------------- count
91 65536 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
94 func_clock.html, func, start
95 value ------------- Distribution ------------- count
97 65536 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
100 The first section, Exclusive function on-CPU times, shows us the time spent
101 on-CPU by various functions, not including time spent in subroutines. You can
102 see here that func_a had four instances of being on-CPU between 16384
103 microseconds and 32767 microseconds.
105 The second section, Inclusive function on-CPU times, shows us the time spent
106 on-CPU by various functions, including that time spent in subroutines called
107 by those functions. You can see that here func_a had four instances of being
108 on-CPU between 65536 microseconds and 131071 microseconds.
110 It is important to pay close attention to the third column, "count" as this
111 will indicate if there were any instances in a particular timeframe, even if
112 the number is too small to show up on the histogram clearly.