ruby-prof 0.15.7 → 0.15.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +5 -0
  3. data/doc/created.rid +4 -4
  4. data/doc/js/search_index.js.gz +0 -0
  5. data/examples/graph.dot +53 -75
  6. data/examples/multi.flat.txt +21 -21
  7. data/examples/multi.graph.html +693 -839
  8. data/examples/multi.grind.dat +93 -173
  9. data/examples/multi.stack.html +411 -437
  10. data/examples/stack.html +411 -437
  11. data/lib/ruby-prof/assets/call_stack_printer.css.html +117 -0
  12. data/lib/ruby-prof/assets/call_stack_printer.js.html +385 -0
  13. data/lib/ruby-prof/assets/call_stack_printer.png +0 -0
  14. data/lib/ruby-prof/printers/flat_printer.rb +1 -1
  15. data/lib/ruby-prof/printers/graph_html_printer.rb +43 -48
  16. data/lib/ruby-prof/version.rb +1 -1
  17. data/ruby-prof.gemspec +1 -1
  18. data/test/measure_memory_test.rb +5 -3
  19. data/test/printers_test.rb +1 -1
  20. metadata +5 -58
  21. data/doc/LICENSE.html +0 -114
  22. data/doc/README_rdoc.html +0 -592
  23. data/doc/Rack.html +0 -95
  24. data/doc/Rack/RubyProf.html +0 -264
  25. data/doc/RubyProf.html +0 -961
  26. data/doc/RubyProf/AbstractPrinter.html +0 -546
  27. data/doc/RubyProf/AggregateCallInfo.html +0 -537
  28. data/doc/RubyProf/CallInfo.html +0 -716
  29. data/doc/RubyProf/CallInfoPrinter.html +0 -120
  30. data/doc/RubyProf/CallInfoVisitor.html +0 -198
  31. data/doc/RubyProf/CallStackPrinter.html +0 -1121
  32. data/doc/RubyProf/CallTreePrinter.html +0 -359
  33. data/doc/RubyProf/Cmd.html +0 -631
  34. data/doc/RubyProf/DotPrinter.html +0 -257
  35. data/doc/RubyProf/FlatPrinter.html +0 -163
  36. data/doc/RubyProf/FlatPrinterWithLineNumbers.html +0 -208
  37. data/doc/RubyProf/GraphHtmlPrinter.html +0 -579
  38. data/doc/RubyProf/GraphPrinter.html +0 -139
  39. data/doc/RubyProf/MethodInfo.html +0 -885
  40. data/doc/RubyProf/MultiPrinter.html +0 -358
  41. data/doc/RubyProf/Profile.html +0 -713
  42. data/doc/RubyProf/ProfileTask.html +0 -490
  43. data/doc/RubyProf/Thread.html +0 -303
  44. data/doc/examples/flat_txt.html +0 -149
  45. data/doc/examples/graph_html.html +0 -850
  46. data/doc/examples/graph_txt.html +0 -274
  47. data/doc/images/add.png +0 -0
  48. data/doc/images/arrow_up.png +0 -0
  49. data/doc/images/brick.png +0 -0
  50. data/doc/images/brick_link.png +0 -0
  51. data/doc/images/bug.png +0 -0
  52. data/doc/images/bullet_black.png +0 -0
  53. data/doc/images/bullet_toggle_minus.png +0 -0
  54. data/doc/images/bullet_toggle_plus.png +0 -0
  55. data/doc/images/date.png +0 -0
  56. data/doc/images/delete.png +0 -0
  57. data/doc/images/find.png +0 -0
  58. data/doc/images/macFFBgHack.png +0 -0
  59. data/doc/images/package.png +0 -0
  60. data/doc/images/page_green.png +0 -0
  61. data/doc/images/page_white_text.png +0 -0
  62. data/doc/images/page_white_width.png +0 -0
  63. data/doc/images/plugin.png +0 -0
  64. data/doc/images/ruby.png +0 -0
  65. data/doc/images/tag_blue.png +0 -0
  66. data/doc/images/tag_green.png +0 -0
  67. data/doc/images/transparent.png +0 -0
  68. data/doc/images/wrench.png +0 -0
  69. data/doc/images/wrench_orange.png +0 -0
  70. data/doc/images/zoom.png +0 -0
  71. data/doc/index.html +0 -618
  72. data/doc/table_of_contents.html +0 -934
  73. data/examples/empty.png +0 -0
  74. data/examples/graph.png +0 -0
  75. data/examples/minus.png +0 -0
  76. data/examples/plus.png +0 -0
@@ -1,303 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>class RubyProf::Thread - ruby-prof</title>
8
-
9
- <script type="text/javascript">
10
- var rdoc_rel_prefix = "../";
11
- </script>
12
-
13
- <script src="../js/jquery.js"></script>
14
- <script src="../js/darkfish.js"></script>
15
-
16
- <link href="../css/fonts.css" rel="stylesheet">
17
- <link href="../css/rdoc.css" rel="stylesheet">
18
-
19
-
20
-
21
- <body id="top" role="document" class="class">
22
- <nav role="navigation">
23
- <div id="project-navigation">
24
- <div id="home-section" role="region" title="Quick navigation" class="nav-section">
25
- <h2>
26
- <a href="../index.html" rel="home">Home</a>
27
- </h2>
28
-
29
- <div id="table-of-contents-navigation">
30
- <a href="../table_of_contents.html#pages">Pages</a>
31
- <a href="../table_of_contents.html#classes">Classes</a>
32
- <a href="../table_of_contents.html#methods">Methods</a>
33
- </div>
34
- </div>
35
-
36
- <div id="search-section" role="search" class="project-section initially-hidden">
37
- <form action="#" method="get" accept-charset="utf-8">
38
- <div id="search-field-wrapper">
39
- <input id="search-field" role="combobox" aria-label="Search"
40
- aria-autocomplete="list" aria-controls="search-results"
41
- type="text" name="search" placeholder="Search" spellcheck="false"
42
- title="Type to search, Up and Down to navigate, Enter to load">
43
- </div>
44
-
45
- <ul id="search-results" aria-label="Search Results"
46
- aria-busy="false" aria-expanded="false"
47
- aria-atomic="false" class="initially-hidden"></ul>
48
- </form>
49
- </div>
50
-
51
- </div>
52
-
53
-
54
-
55
- <div id="class-metadata">
56
-
57
- <div id="parent-class-section" class="nav-section">
58
- <h3>Parent</h3>
59
-
60
-
61
- <p class="link">Object
62
-
63
- </div>
64
-
65
-
66
-
67
- <!-- Method Quickref -->
68
- <div id="method-list-section" class="nav-section">
69
- <h3>Methods</h3>
70
-
71
- <ul class="link-list" role="directory">
72
-
73
- <li ><a href="#method-i-detect_recursion">#detect_recursion</a>
74
-
75
- <li ><a href="#method-i-recalc_recursion">#recalc_recursion</a>
76
-
77
- <li ><a href="#method-i-top_call_infos">#top_call_infos</a>
78
-
79
- <li ><a href="#method-i-top_methods">#top_methods</a>
80
-
81
- <li ><a href="#method-i-total_time">#total_time</a>
82
-
83
- </ul>
84
- </div>
85
-
86
- </div>
87
- </nav>
88
-
89
- <main role="main" aria-labelledby="class-RubyProf::Thread">
90
- <h1 id="class-RubyProf::Thread" class="class">
91
- class RubyProf::Thread
92
- </h1>
93
-
94
- <section class="description">
95
-
96
- </section>
97
-
98
-
99
-
100
-
101
- <section id="5Buntitled-5D" class="documentation-section">
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
112
- <header>
113
- <h3>Public Instance Methods</h3>
114
- </header>
115
-
116
-
117
- <div id="method-i-detect_recursion" class="method-detail ">
118
-
119
- <div class="method-heading">
120
- <span class="method-name">detect_recursion</span><span
121
- class="method-args">()</span>
122
-
123
- <span class="method-click-advice">click to toggle source</span>
124
-
125
- </div>
126
-
127
-
128
- <div class="method-description">
129
-
130
- <p>This method detect recursive calls in the call tree of a given thread It
131
- should be called only once for each thread</p>
132
-
133
-
134
-
135
-
136
- <div class="method-source-code" id="detect_recursion-source">
137
- <pre><span class="ruby-comment"># File lib/ruby-prof/thread.rb, line 15</span>
138
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">detect_recursion</span>
139
- <span class="ruby-identifier">top_call_infos</span>.<span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:detect_recursion</span>)
140
- <span class="ruby-keyword">end</span></pre>
141
- </div>
142
-
143
- </div>
144
-
145
-
146
-
147
-
148
- </div>
149
-
150
-
151
- <div id="method-i-recalc_recursion" class="method-detail ">
152
-
153
- <div class="method-heading">
154
- <span class="method-name">recalc_recursion</span><span
155
- class="method-args">()</span>
156
-
157
- <span class="method-click-advice">click to toggle source</span>
158
-
159
- </div>
160
-
161
-
162
- <div class="method-description">
163
-
164
-
165
-
166
-
167
-
168
-
169
- <div class="method-source-code" id="recalc_recursion-source">
170
- <pre><span class="ruby-comment"># File lib/ruby-prof/thread.rb, line 19</span>
171
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">recalc_recursion</span>
172
- <span class="ruby-identifier">top_call_infos</span>.<span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:recalc_recursion</span>)
173
- <span class="ruby-keyword">end</span></pre>
174
- </div>
175
-
176
- </div>
177
-
178
-
179
-
180
-
181
- </div>
182
-
183
-
184
- <div id="method-i-top_call_infos" class="method-detail ">
185
-
186
- <div class="method-heading">
187
- <span class="method-name">top_call_infos</span><span
188
- class="method-args">()</span>
189
-
190
- <span class="method-click-advice">click to toggle source</span>
191
-
192
- </div>
193
-
194
-
195
- <div class="method-description">
196
-
197
-
198
-
199
-
200
-
201
-
202
- <div class="method-source-code" id="top_call_infos-source">
203
- <pre><span class="ruby-comment"># File lib/ruby-prof/thread.rb, line 9</span>
204
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">top_call_infos</span>
205
- <span class="ruby-identifier">top_methods</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:call_infos</span>).<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">select</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:root?</span>)
206
- <span class="ruby-keyword">end</span></pre>
207
- </div>
208
-
209
- </div>
210
-
211
-
212
-
213
-
214
- </div>
215
-
216
-
217
- <div id="method-i-top_methods" class="method-detail ">
218
-
219
- <div class="method-heading">
220
- <span class="method-name">top_methods</span><span
221
- class="method-args">()</span>
222
-
223
- <span class="method-click-advice">click to toggle source</span>
224
-
225
- </div>
226
-
227
-
228
- <div class="method-description">
229
-
230
-
231
-
232
-
233
-
234
-
235
- <div class="method-source-code" id="top_methods-source">
236
- <pre><span class="ruby-comment"># File lib/ruby-prof/thread.rb, line 3</span>
237
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">top_methods</span>
238
- <span class="ruby-keyword">self</span>.<span class="ruby-identifier">methods</span>.<span class="ruby-identifier">select</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">method_info</span><span class="ruby-operator">|</span>
239
- <span class="ruby-identifier">method_info</span>.<span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">detect</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:root?</span>)
240
- <span class="ruby-keyword">end</span>
241
- <span class="ruby-keyword">end</span></pre>
242
- </div>
243
-
244
- </div>
245
-
246
-
247
-
248
-
249
- </div>
250
-
251
-
252
- <div id="method-i-total_time" class="method-detail ">
253
-
254
- <div class="method-heading">
255
- <span class="method-name">total_time</span><span
256
- class="method-args">()</span>
257
-
258
- <span class="method-click-advice">click to toggle source</span>
259
-
260
- </div>
261
-
262
-
263
- <div class="method-description">
264
-
265
-
266
-
267
-
268
-
269
-
270
- <div class="method-source-code" id="total_time-source">
271
- <pre><span class="ruby-comment"># File lib/ruby-prof/thread.rb, line 23</span>
272
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">total_time</span>
273
- <span class="ruby-keyword">self</span>.<span class="ruby-identifier">top_methods</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sum</span>, <span class="ruby-identifier">method_info</span><span class="ruby-operator">|</span>
274
- <span class="ruby-identifier">method_info</span>.<span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span>
275
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">nil?</span>
276
- <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">total_time</span>
277
- <span class="ruby-keyword">end</span>
278
- <span class="ruby-keyword">end</span>
279
- <span class="ruby-identifier">sum</span>
280
- <span class="ruby-keyword">end</span>
281
- <span class="ruby-keyword">end</span></pre>
282
- </div>
283
-
284
- </div>
285
-
286
-
287
-
288
-
289
- </div>
290
-
291
-
292
- </section>
293
-
294
- </section>
295
- </main>
296
-
297
-
298
- <footer id="validator-badges" role="contentinfo">
299
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
300
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
301
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
302
- </footer>
303
-
@@ -1,149 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>flat - ruby-prof</title>
8
-
9
- <script type="text/javascript">
10
- var rdoc_rel_prefix = "../";
11
- </script>
12
-
13
- <script src="../js/jquery.js"></script>
14
- <script src="../js/darkfish.js"></script>
15
-
16
- <link href="../css/fonts.css" rel="stylesheet">
17
- <link href="../css/rdoc.css" rel="stylesheet">
18
-
19
-
20
-
21
- <body id="top" role="document" class="file">
22
- <nav role="navigation">
23
- <div id="project-navigation">
24
- <div id="home-section" role="region" title="Quick navigation" class="nav-section">
25
- <h2>
26
- <a href="../index.html" rel="home">Home</a>
27
- </h2>
28
-
29
- <div id="table-of-contents-navigation">
30
- <a href="../table_of_contents.html#pages">Pages</a>
31
- <a href="../table_of_contents.html#classes">Classes</a>
32
- <a href="../table_of_contents.html#methods">Methods</a>
33
- </div>
34
- </div>
35
-
36
- <div id="search-section" role="search" class="project-section initially-hidden">
37
- <form action="#" method="get" accept-charset="utf-8">
38
- <div id="search-field-wrapper">
39
- <input id="search-field" role="combobox" aria-label="Search"
40
- aria-autocomplete="list" aria-controls="search-results"
41
- type="text" name="search" placeholder="Search" spellcheck="false"
42
- title="Type to search, Up and Down to navigate, Enter to load">
43
- </div>
44
-
45
- <ul id="search-results" aria-label="Search Results"
46
- aria-busy="false" aria-expanded="false"
47
- aria-atomic="false" class="initially-hidden"></ul>
48
- </form>
49
- </div>
50
-
51
- </div>
52
-
53
-
54
-
55
- <div id="project-metadata">
56
- <div id="fileindex-section" class="nav-section">
57
- <h3>Pages</h3>
58
-
59
- <ul class="link-list">
60
-
61
- <li><a href="../LICENSE.html">LICENSE</a>
62
-
63
- <li><a href="../README_rdoc.html">README</a>
64
-
65
- <li><a href="../examples/flat_txt.html">flat</a>
66
-
67
- <li><a href="../examples/graph_html.html">graph.html</a>
68
-
69
- <li><a href="../examples/graph_txt.html">graph</a>
70
-
71
- </ul>
72
- </div>
73
-
74
- </div>
75
- </nav>
76
-
77
- <main role="main" aria-label="Page examples/flat.txt">
78
-
79
- <h1 id="label-Flat+Profiles">Flat Profiles<span><a href="#label-Flat+Profiles">&para;</a> <a href="#top">&uarr;</a></span></h1>
80
-
81
- <p>Flat profiles show the total amount of time spent in each method. As an
82
- example, here is the output from running printers_test.rb.</p>
83
-
84
- <p>Thread ID: 21277412</p>
85
-
86
- <pre>%self cumulative total self children calls self/call total/call name
87
- 46.34 4.06 8.72 4.06 4.66 501 0.01 0.02 Integer#upto
88
- 23.89 6.16 2.09 2.09 0.00 61 0.03 0.03 Kernel.sleep
89
- 15.12 7.48 1.33 1.33 0.00 250862 0.00 0.00 Fixnum#%
90
- 14.13 8.72 1.24 1.24 0.00 250862 0.00 0.00 Fixnum#==
91
- 0.18 8.74 0.02 0.02 0.00 1 0.02 0.02 Array#each_index
92
- 0.17 8.75 6.64 0.01 6.63 500 0.00 0.01 Object#is_prime
93
- 0.17 8.77 6.66 0.01 6.64 1 0.01 6.66 Array#select
94
- 0.00 8.77 0.00 0.00 0.00 501 0.00 0.00 Fixnum#-
95
- 0.00 8.77 0.00 0.00 0.00 1 0.00 0.00 Array#first
96
- 0.00 8.77 0.00 0.00 0.00 1 0.00 0.00 Array#length
97
- 0.00 8.77 0.00 0.00 0.00 1 0.00 0.00 Array#initialize
98
- 0.00 8.77 8.77 0.00 8.77 1 0.00 8.77 Object#run_primes
99
- 0.00 8.77 0.00 0.00 0.00 1 0.00 0.00 Integer#to_int
100
- 0.00 8.77 6.66 0.00 6.66 1 0.00 6.66 Object#find_primes
101
- 0.00 8.77 2.09 0.00 2.09 1 0.00 2.09 Object#find_largest
102
- 0.00 8.77 0.02 0.00 0.02 1 0.00 0.02 Object#make_random_array
103
- 0.00 8.77 0.00 0.00 0.00 1 0.00 0.00 Class#new
104
- 0.00 8.77 0.00 0.00 0.00 500 0.00 0.00 Array#[]=
105
- 0.00 8.77 0.00 0.00 0.00 61 0.00 0.00 Fixnum#&gt;
106
- 0.00 8.77 0.00 0.00 0.00 61 0.00 0.00 Array#[]
107
- 0.00 8.77 8.77 0.00 8.77 1 0.00 8.77 #toplevel
108
- 0.00 8.77 0.00 0.00 0.00 500 0.00 0.00 Kernel.rand</pre>
109
-
110
- <p>All values are in seconds.</p>
111
-
112
- <p>The columns are:</p>
113
-
114
- <pre> %self - The percentage of time spent in this method, derived from self_time/total_time
115
- cumulative - The sum of the time spent in this method and all the methods listed above it.
116
- total - The time spent in this method and its children.
117
- self - The time spent in this method.
118
- children - The time spent in this method&#39;s children.
119
- calls - The number of times this method was called.
120
- self/call - The average time spent per call in this method.
121
- total/call - The average time spent per call in this method and its children.
122
- name - The name of the method.</pre>
123
-
124
- <p>Methods are sorted based on %self, therefore the methods that execute the
125
- longest are listed first.</p>
126
-
127
- <p>The interpretation of method names is:</p>
128
- <ul><li>
129
- <p>toplevel - The root method that calls all other methods</p>
130
- </li><li>
131
- <p>MyObject#test - An instance method “test” of the class “MyObject”</p>
132
- </li><li>
133
- <p>&lt;Object:MyObject&gt;#test - The &lt;&gt; characters indicate a singleton
134
- method on a singleton class.</p>
135
- </li></ul>
136
-
137
- <p>For example, wee can see that Integer#upto took the most time, 4.06
138
- seconds. An additional 4.66 seconds were spent in its children, for a
139
- total time of 8.72 seconds.</p>
140
- </main>
141
-
142
-
143
-
144
- <footer id="validator-badges" role="contentinfo">
145
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
146
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
147
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
148
- </footer>
149
-