ruby-prof 0.15.3 → 0.15.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +9 -0
  3. data/README.rdoc +24 -39
  4. data/bin/ruby-prof +1 -2
  5. data/doc/created.rid +8 -8
  6. data/doc/js/search_index.js +1 -1
  7. data/doc/js/search_index.js.gz +0 -0
  8. data/ext/ruby_prof/rp_measure.c +20 -28
  9. data/ext/ruby_prof/rp_measure.h +6 -6
  10. data/ext/ruby_prof/rp_measure_allocations.c +9 -2
  11. data/ext/ruby_prof/rp_measure_memory.c +4 -0
  12. data/lib/ruby-prof.rb +9 -20
  13. data/lib/ruby-prof/compatibility.rb +12 -4
  14. data/lib/ruby-prof/printers/flat_printer.rb +1 -0
  15. data/lib/ruby-prof/version.rb +1 -1
  16. data/test/thread_test.rb +7 -4
  17. metadata +2 -54
  18. data/doc/LICENSE.html +0 -114
  19. data/doc/README_rdoc.html +0 -607
  20. data/doc/Rack.html +0 -95
  21. data/doc/Rack/RubyProf.html +0 -264
  22. data/doc/RubyProf.html +0 -965
  23. data/doc/RubyProf/AbstractPrinter.html +0 -546
  24. data/doc/RubyProf/AggregateCallInfo.html +0 -537
  25. data/doc/RubyProf/CallInfo.html +0 -468
  26. data/doc/RubyProf/CallInfoPrinter.html +0 -120
  27. data/doc/RubyProf/CallInfoVisitor.html +0 -200
  28. data/doc/RubyProf/CallStackPrinter.html +0 -1604
  29. data/doc/RubyProf/CallTreePrinter.html +0 -359
  30. data/doc/RubyProf/Cmd.html +0 -624
  31. data/doc/RubyProf/DotPrinter.html +0 -257
  32. data/doc/RubyProf/FlatPrinter.html +0 -163
  33. data/doc/RubyProf/FlatPrinterWithLineNumbers.html +0 -201
  34. data/doc/RubyProf/GraphHtmlPrinter.html +0 -575
  35. data/doc/RubyProf/GraphPrinter.html +0 -139
  36. data/doc/RubyProf/MethodInfo.html +0 -685
  37. data/doc/RubyProf/MultiPrinter.html +0 -358
  38. data/doc/RubyProf/Profile.html +0 -764
  39. data/doc/RubyProf/ProfileTask.html +0 -490
  40. data/doc/RubyProf/Thread.html +0 -199
  41. data/doc/examples/flat_txt.html +0 -149
  42. data/doc/examples/graph_html.html +0 -850
  43. data/doc/examples/graph_txt.html +0 -274
  44. data/doc/images/add.png +0 -0
  45. data/doc/images/arrow_up.png +0 -0
  46. data/doc/images/brick.png +0 -0
  47. data/doc/images/brick_link.png +0 -0
  48. data/doc/images/bug.png +0 -0
  49. data/doc/images/bullet_black.png +0 -0
  50. data/doc/images/bullet_toggle_minus.png +0 -0
  51. data/doc/images/bullet_toggle_plus.png +0 -0
  52. data/doc/images/date.png +0 -0
  53. data/doc/images/delete.png +0 -0
  54. data/doc/images/find.png +0 -0
  55. data/doc/images/macFFBgHack.png +0 -0
  56. data/doc/images/package.png +0 -0
  57. data/doc/images/page_green.png +0 -0
  58. data/doc/images/page_white_text.png +0 -0
  59. data/doc/images/page_white_width.png +0 -0
  60. data/doc/images/plugin.png +0 -0
  61. data/doc/images/ruby.png +0 -0
  62. data/doc/images/tag_blue.png +0 -0
  63. data/doc/images/tag_green.png +0 -0
  64. data/doc/images/transparent.png +0 -0
  65. data/doc/images/wrench.png +0 -0
  66. data/doc/images/wrench_orange.png +0 -0
  67. data/doc/images/zoom.png +0 -0
  68. data/doc/index.html +0 -633
  69. data/doc/table_of_contents.html +0 -859
@@ -1,139 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>class RubyProf::GraphPrinter - 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"><a href="AbstractPrinter.html">RubyProf::AbstractPrinter</a>
62
-
63
- </div>
64
-
65
-
66
-
67
-
68
- </div>
69
- </nav>
70
-
71
- <main role="main" aria-labelledby="class-RubyProf::GraphPrinter">
72
- <h1 id="class-RubyProf::GraphPrinter" class="class">
73
- class RubyProf::GraphPrinter
74
- </h1>
75
-
76
- <section class="description">
77
-
78
- <p>Generates <a href="../files/examples/graph_txt.html">graph</a> profile
79
- reports as text. To use the graph printer:</p>
80
-
81
- <pre>result = RubyProf.profile do
82
- [code to profile]
83
- end
84
-
85
- printer = RubyProf::GraphPrinter.new(result)
86
- printer.print(STDOUT, {})</pre>
87
-
88
- <p>The constructor takes two arguments. See the <a
89
- href="../README_rdoc.html">README</a></p>
90
-
91
- </section>
92
-
93
-
94
-
95
-
96
- <section id="5Buntitled-5D" class="documentation-section">
97
-
98
-
99
-
100
-
101
-
102
- <section class="constants-list">
103
- <header>
104
- <h3>Constants</h3>
105
- </header>
106
- <dl>
107
-
108
- <dt id="CALL_WIDTH">CALL_WIDTH
109
-
110
- <dd>
111
-
112
-
113
- <dt id="PERCENTAGE_WIDTH">PERCENTAGE_WIDTH
114
-
115
- <dd>
116
-
117
-
118
- <dt id="TIME_WIDTH">TIME_WIDTH
119
-
120
- <dd>
121
-
122
-
123
- </dl>
124
- </section>
125
-
126
-
127
-
128
-
129
-
130
- </section>
131
- </main>
132
-
133
-
134
- <footer id="validator-badges" role="contentinfo">
135
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
136
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
137
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
138
- </footer>
139
-
@@ -1,685 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>class RubyProf::MethodInfo - 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
- <div id="includes-section" class="nav-section">
66
- <h3>Included Modules</h3>
67
-
68
- <ul class="link-list">
69
-
70
-
71
- <li><span class="include">Comparable</span>
72
-
73
-
74
- </ul>
75
- </div>
76
-
77
-
78
- <!-- Method Quickref -->
79
- <div id="method-list-section" class="nav-section">
80
- <h3>Methods</h3>
81
-
82
- <ul class="link-list" role="directory">
83
-
84
- <li ><a href="#method-i-3C-3D-3E">#&lt;=&gt;</a>
85
-
86
- <li ><a href="#method-i-aggregate_children">#aggregate_children</a>
87
-
88
- <li ><a href="#method-i-aggregate_parents">#aggregate_parents</a>
89
-
90
- <li ><a href="#method-i-called">#called</a>
91
-
92
- <li ><a href="#method-i-children">#children</a>
93
-
94
- <li ><a href="#method-i-children_time">#children_time</a>
95
-
96
- <li ><a href="#method-i-eliminate-21">#eliminate!</a>
97
-
98
- <li ><a href="#method-i-min_depth">#min_depth</a>
99
-
100
- <li ><a href="#method-i-recursive-3F">#recursive?</a>
101
-
102
- <li ><a href="#method-i-root-3F">#root?</a>
103
-
104
- <li ><a href="#method-i-self_time">#self_time</a>
105
-
106
- <li ><a href="#method-i-to_s">#to_s</a>
107
-
108
- <li ><a href="#method-i-total_time">#total_time</a>
109
-
110
- <li ><a href="#method-i-wait_time">#wait_time</a>
111
-
112
- </ul>
113
- </div>
114
-
115
- </div>
116
- </nav>
117
-
118
- <main role="main" aria-labelledby="class-RubyProf::MethodInfo">
119
- <h1 id="class-RubyProf::MethodInfo" class="class">
120
- class RubyProf::MethodInfo
121
- </h1>
122
-
123
- <section class="description">
124
-
125
- </section>
126
-
127
-
128
-
129
-
130
- <section id="5Buntitled-5D" class="documentation-section">
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
141
- <header>
142
- <h3>Public Instance Methods</h3>
143
- </header>
144
-
145
-
146
- <div id="method-i-3C-3D-3E" class="method-detail ">
147
-
148
- <div class="method-heading">
149
- <span class="method-name">&lt;=&gt;</span><span
150
- class="method-args">(other)</span>
151
-
152
- <span class="method-click-advice">click to toggle source</span>
153
-
154
- </div>
155
-
156
-
157
- <div class="method-description">
158
-
159
-
160
-
161
-
162
-
163
-
164
- <div class="method-source-code" id="3C-3D-3E-source">
165
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 6</span>
166
- <span class="ruby-keyword">def</span> <span class="ruby-operator">&lt;=&gt;</span>(<span class="ruby-identifier">other</span>)
167
- <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">total_time</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">total_time</span>
168
- <span class="ruby-value">-1</span>
169
- <span class="ruby-keyword">elsif</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">total_time</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">total_time</span>
170
- <span class="ruby-value">1</span>
171
- <span class="ruby-keyword">elsif</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">min_depth</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">min_depth</span>
172
- <span class="ruby-value">1</span>
173
- <span class="ruby-keyword">elsif</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">min_depth</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">min_depth</span>
174
- <span class="ruby-value">-1</span>
175
- <span class="ruby-keyword">else</span>
176
- <span class="ruby-keyword">self</span>.<span class="ruby-identifier">full_name</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">full_name</span>
177
- <span class="ruby-keyword">end</span>
178
- <span class="ruby-keyword">end</span></pre>
179
- </div>
180
-
181
- </div>
182
-
183
-
184
-
185
-
186
- </div>
187
-
188
-
189
- <div id="method-i-aggregate_children" class="method-detail ">
190
-
191
- <div class="method-heading">
192
- <span class="method-name">aggregate_children</span><span
193
- class="method-args">()</span>
194
-
195
- <span class="method-click-advice">click to toggle source</span>
196
-
197
- </div>
198
-
199
-
200
- <div class="method-description">
201
-
202
-
203
-
204
-
205
-
206
-
207
- <div class="method-source-code" id="aggregate_children-source">
208
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 105</span>
209
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">aggregate_children</span>
210
- <span class="ruby-comment"># Group call info&#39;s based on their targets</span>
211
- <span class="ruby-identifier">groups</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>, <span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span>
212
- <span class="ruby-identifier">key</span> = <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">target</span>
213
- (<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">||=</span> []) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">call_info</span>
214
- <span class="ruby-identifier">hash</span>
215
- <span class="ruby-keyword">end</span>
216
-
217
- <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
218
- <span class="ruby-constant">AggregateCallInfo</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>)
219
- <span class="ruby-keyword">end</span>
220
- <span class="ruby-keyword">end</span></pre>
221
- </div>
222
-
223
- </div>
224
-
225
-
226
-
227
-
228
- </div>
229
-
230
-
231
- <div id="method-i-aggregate_parents" class="method-detail ">
232
-
233
- <div class="method-heading">
234
- <span class="method-name">aggregate_parents</span><span
235
- class="method-args">()</span>
236
-
237
- <span class="method-click-advice">click to toggle source</span>
238
-
239
- </div>
240
-
241
-
242
- <div class="method-description">
243
-
244
-
245
-
246
-
247
-
248
-
249
- <div class="method-source-code" id="aggregate_parents-source">
250
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 92</span>
251
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">aggregate_parents</span>
252
- <span class="ruby-comment"># Group call info&#39;s based on their parents</span>
253
- <span class="ruby-identifier">groups</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>, <span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span>
254
- <span class="ruby-identifier">key</span> = <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">parent</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">target</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">self</span>
255
- (<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">||=</span> []) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">call_info</span>
256
- <span class="ruby-identifier">hash</span>
257
- <span class="ruby-keyword">end</span>
258
-
259
- <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
260
- <span class="ruby-constant">AggregateCallInfo</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>)
261
- <span class="ruby-keyword">end</span>
262
- <span class="ruby-keyword">end</span></pre>
263
- </div>
264
-
265
- </div>
266
-
267
-
268
-
269
-
270
- </div>
271
-
272
-
273
- <div id="method-i-called" class="method-detail ">
274
-
275
- <div class="method-heading">
276
- <span class="method-name">called</span><span
277
- class="method-args">()</span>
278
-
279
- <span class="method-click-advice">click to toggle source</span>
280
-
281
- </div>
282
-
283
-
284
- <div class="method-description">
285
-
286
-
287
-
288
-
289
-
290
-
291
- <div class="method-source-code" id="called-source">
292
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 20</span>
293
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">called</span>
294
- <span class="ruby-ivar">@called</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
295
- <span class="ruby-identifier">call_infos</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">call_info</span><span class="ruby-operator">|</span>
296
- <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">called</span>
297
- <span class="ruby-keyword">end</span>
298
- <span class="ruby-keyword">end</span>
299
- <span class="ruby-keyword">end</span></pre>
300
- </div>
301
-
302
- </div>
303
-
304
-
305
-
306
-
307
- </div>
308
-
309
-
310
- <div id="method-i-children" class="method-detail ">
311
-
312
- <div class="method-heading">
313
- <span class="method-name">children</span><span
314
- class="method-args">()</span>
315
-
316
- <span class="method-click-advice">click to toggle source</span>
317
-
318
- </div>
319
-
320
-
321
- <div class="method-description">
322
-
323
-
324
-
325
-
326
-
327
-
328
- <div class="method-source-code" id="children-source">
329
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 84</span>
330
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">children</span>
331
- <span class="ruby-ivar">@children</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
332
- <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span>
333
- <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">children</span>
334
- <span class="ruby-keyword">end</span>.<span class="ruby-identifier">flatten</span>
335
- <span class="ruby-keyword">end</span>
336
- <span class="ruby-keyword">end</span></pre>
337
- </div>
338
-
339
- </div>
340
-
341
-
342
-
343
-
344
- </div>
345
-
346
-
347
- <div id="method-i-children_time" class="method-detail ">
348
-
349
- <div class="method-heading">
350
- <span class="method-name">children_time</span><span
351
- class="method-args">()</span>
352
-
353
- <span class="method-click-advice">click to toggle source</span>
354
-
355
- </div>
356
-
357
-
358
- <div class="method-description">
359
-
360
-
361
-
362
-
363
-
364
-
365
- <div class="method-source-code" id="children_time-source">
366
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 55</span>
367
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">children_time</span>
368
- <span class="ruby-ivar">@children_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
369
- <span class="ruby-identifier">call_infos</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">call_info</span><span class="ruby-operator">|</span>
370
- <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">children_time</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive</span>
371
- <span class="ruby-identifier">sum</span>
372
- <span class="ruby-keyword">end</span>
373
- <span class="ruby-keyword">end</span>
374
- <span class="ruby-keyword">end</span></pre>
375
- </div>
376
-
377
- </div>
378
-
379
-
380
-
381
-
382
- </div>
383
-
384
-
385
- <div id="method-i-eliminate-21" class="method-detail ">
386
-
387
- <div class="method-heading">
388
- <span class="method-name">eliminate!</span><span
389
- class="method-args">()</span>
390
-
391
- <span class="method-click-advice">click to toggle source</span>
392
-
393
- </div>
394
-
395
-
396
- <div class="method-description">
397
-
398
- <p>remove method from the call graph. should not be called directly.</p>
399
-
400
-
401
-
402
-
403
- <div class="method-source-code" id="eliminate-21-source">
404
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 123</span>
405
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">eliminate!</span>
406
- <span class="ruby-comment"># $stderr.puts &quot;eliminating #{self}&quot;</span>
407
- <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">eliminate!</span> }
408
- <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">clear</span>
409
- <span class="ruby-keyword">end</span></pre>
410
- </div>
411
-
412
- </div>
413
-
414
-
415
-
416
-
417
- </div>
418
-
419
-
420
- <div id="method-i-min_depth" class="method-detail ">
421
-
422
- <div class="method-heading">
423
- <span class="method-name">min_depth</span><span
424
- class="method-args">()</span>
425
-
426
- <span class="method-click-advice">click to toggle source</span>
427
-
428
- </div>
429
-
430
-
431
- <div class="method-description">
432
-
433
-
434
-
435
-
436
-
437
-
438
- <div class="method-source-code" id="min_depth-source">
439
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 64</span>
440
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">min_depth</span>
441
- <span class="ruby-ivar">@min_depth</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span>
442
- <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">depth</span>
443
- <span class="ruby-keyword">end</span>.<span class="ruby-identifier">min</span>
444
- <span class="ruby-keyword">end</span></pre>
445
- </div>
446
-
447
- </div>
448
-
449
-
450
-
451
-
452
- </div>
453
-
454
-
455
- <div id="method-i-recursive-3F" class="method-detail ">
456
-
457
- <div class="method-heading">
458
- <span class="method-name">recursive?</span><span
459
- class="method-args">()</span>
460
-
461
- <span class="method-click-advice">click to toggle source</span>
462
-
463
- </div>
464
-
465
-
466
- <div class="method-description">
467
-
468
-
469
-
470
-
471
-
472
-
473
- <div class="method-source-code" id="recursive-3F-source">
474
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 78</span>
475
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">recursive?</span>
476
- <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">detect</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span>
477
- <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive</span>
478
- <span class="ruby-keyword">end</span>
479
- <span class="ruby-keyword">end</span></pre>
480
- </div>
481
-
482
- </div>
483
-
484
-
485
-
486
-
487
- </div>
488
-
489
-
490
- <div id="method-i-root-3F" class="method-detail ">
491
-
492
- <div class="method-heading">
493
- <span class="method-name">root?</span><span
494
- class="method-args">()</span>
495
-
496
- <span class="method-click-advice">click to toggle source</span>
497
-
498
- </div>
499
-
500
-
501
- <div class="method-description">
502
-
503
-
504
-
505
-
506
-
507
-
508
- <div class="method-source-code" id="root-3F-source">
509
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 70</span>
510
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">root?</span>
511
- <span class="ruby-ivar">@root</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
512
- <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">find</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span>
513
- <span class="ruby-keyword">not</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">root?</span>
514
- <span class="ruby-keyword">end</span>.<span class="ruby-identifier">nil?</span>
515
- <span class="ruby-keyword">end</span>
516
- <span class="ruby-keyword">end</span></pre>
517
- </div>
518
-
519
- </div>
520
-
521
-
522
-
523
-
524
- </div>
525
-
526
-
527
- <div id="method-i-self_time" class="method-detail ">
528
-
529
- <div class="method-heading">
530
- <span class="method-name">self_time</span><span
531
- class="method-args">()</span>
532
-
533
- <span class="method-click-advice">click to toggle source</span>
534
-
535
- </div>
536
-
537
-
538
- <div class="method-description">
539
-
540
-
541
-
542
-
543
-
544
-
545
- <div class="method-source-code" id="self_time-source">
546
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 37</span>
547
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">self_time</span>
548
- <span class="ruby-ivar">@self_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
549
- <span class="ruby-identifier">call_infos</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">call_info</span><span class="ruby-operator">|</span>
550
- <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">self_time</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive</span>
551
- <span class="ruby-identifier">sum</span>
552
- <span class="ruby-keyword">end</span>
553
- <span class="ruby-keyword">end</span>
554
- <span class="ruby-keyword">end</span></pre>
555
- </div>
556
-
557
- </div>
558
-
559
-
560
-
561
-
562
- </div>
563
-
564
-
565
- <div id="method-i-to_s" class="method-detail ">
566
-
567
- <div class="method-heading">
568
- <span class="method-name">to_s</span><span
569
- class="method-args">()</span>
570
-
571
- <span class="method-click-advice">click to toggle source</span>
572
-
573
- </div>
574
-
575
-
576
- <div class="method-description">
577
-
578
-
579
-
580
-
581
-
582
-
583
- <div class="method-source-code" id="to_s-source">
584
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 118</span>
585
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
586
- <span class="ruby-node">&quot;#{self.full_name} (c: #{self.called}, tt: #{self.total_time}, st: #{self.self_time}, ct: #{self.children_time})&quot;</span>
587
- <span class="ruby-keyword">end</span></pre>
588
- </div>
589
-
590
- </div>
591
-
592
-
593
-
594
-
595
- </div>
596
-
597
-
598
- <div id="method-i-total_time" class="method-detail ">
599
-
600
- <div class="method-heading">
601
- <span class="method-name">total_time</span><span
602
- class="method-args">()</span>
603
-
604
- <span class="method-click-advice">click to toggle source</span>
605
-
606
- </div>
607
-
608
-
609
- <div class="method-description">
610
-
611
-
612
-
613
-
614
-
615
-
616
- <div class="method-source-code" id="total_time-source">
617
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 28</span>
618
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">total_time</span>
619
- <span class="ruby-ivar">@total_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
620
- <span class="ruby-identifier">call_infos</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">call_info</span><span class="ruby-operator">|</span>
621
- <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> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive</span>
622
- <span class="ruby-identifier">sum</span>
623
- <span class="ruby-keyword">end</span>
624
- <span class="ruby-keyword">end</span>
625
- <span class="ruby-keyword">end</span></pre>
626
- </div>
627
-
628
- </div>
629
-
630
-
631
-
632
-
633
- </div>
634
-
635
-
636
- <div id="method-i-wait_time" class="method-detail ">
637
-
638
- <div class="method-heading">
639
- <span class="method-name">wait_time</span><span
640
- class="method-args">()</span>
641
-
642
- <span class="method-click-advice">click to toggle source</span>
643
-
644
- </div>
645
-
646
-
647
- <div class="method-description">
648
-
649
-
650
-
651
-
652
-
653
-
654
- <div class="method-source-code" id="wait_time-source">
655
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 46</span>
656
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">wait_time</span>
657
- <span class="ruby-ivar">@wait_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
658
- <span class="ruby-identifier">call_infos</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">call_info</span><span class="ruby-operator">|</span>
659
- <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">wait_time</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive</span>
660
- <span class="ruby-identifier">sum</span>
661
- <span class="ruby-keyword">end</span>
662
- <span class="ruby-keyword">end</span>
663
- <span class="ruby-keyword">end</span></pre>
664
- </div>
665
-
666
- </div>
667
-
668
-
669
-
670
-
671
- </div>
672
-
673
-
674
- </section>
675
-
676
- </section>
677
- </main>
678
-
679
-
680
- <footer id="validator-badges" role="contentinfo">
681
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
682
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
683
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
684
- </footer>
685
-