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,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,885 +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-clear_cached_values_which_depend_on_recursiveness">#clear_cached_values_which_depend_on_recursiveness</a>
97
-
98
- <li ><a href="#method-i-detect_recursion">#detect_recursion</a>
99
-
100
- <li ><a href="#method-i-eliminate-21">#eliminate!</a>
101
-
102
- <li ><a href="#method-i-min_depth">#min_depth</a>
103
-
104
- <li ><a href="#method-i-non_recursive">#non_recursive</a>
105
-
106
- <li ><a href="#method-i-non_recursive-3F">#non_recursive?</a>
107
-
108
- <li ><a href="#method-i-parents">#parents</a>
109
-
110
- <li ><a href="#method-i-recalc_recursion">#recalc_recursion</a>
111
-
112
- <li ><a href="#method-i-recursive-3F">#recursive?</a>
113
-
114
- <li ><a href="#method-i-root-3F">#root?</a>
115
-
116
- <li ><a href="#method-i-self_time">#self_time</a>
117
-
118
- <li ><a href="#method-i-to_s">#to_s</a>
119
-
120
- <li ><a href="#method-i-total_time">#total_time</a>
121
-
122
- <li ><a href="#method-i-wait_time">#wait_time</a>
123
-
124
- </ul>
125
- </div>
126
-
127
- </div>
128
- </nav>
129
-
130
- <main role="main" aria-labelledby="class-RubyProf::MethodInfo">
131
- <h1 id="class-RubyProf::MethodInfo" class="class">
132
- class RubyProf::MethodInfo
133
- </h1>
134
-
135
- <section class="description">
136
-
137
- </section>
138
-
139
-
140
-
141
-
142
- <section id="5Buntitled-5D" class="documentation-section">
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
153
- <header>
154
- <h3>Public Instance Methods</h3>
155
- </header>
156
-
157
-
158
- <div id="method-i-3C-3D-3E" class="method-detail ">
159
-
160
- <div class="method-heading">
161
- <span class="method-name">&lt;=&gt;</span><span
162
- class="method-args">(other)</span>
163
-
164
- <span class="method-click-advice">click to toggle source</span>
165
-
166
- </div>
167
-
168
-
169
- <div class="method-description">
170
-
171
-
172
-
173
-
174
-
175
-
176
- <div class="method-source-code" id="3C-3D-3E-source">
177
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 6</span>
178
- <span class="ruby-keyword">def</span> <span class="ruby-operator">&lt;=&gt;</span>(<span class="ruby-identifier">other</span>)
179
- <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>
180
- <span class="ruby-value">-1</span>
181
- <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>
182
- <span class="ruby-value">1</span>
183
- <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>
184
- <span class="ruby-value">1</span>
185
- <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>
186
- <span class="ruby-value">-1</span>
187
- <span class="ruby-keyword">else</span>
188
- <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>
189
- <span class="ruby-keyword">end</span>
190
- <span class="ruby-keyword">end</span></pre>
191
- </div>
192
-
193
- </div>
194
-
195
-
196
-
197
-
198
- </div>
199
-
200
-
201
- <div id="method-i-aggregate_children" class="method-detail ">
202
-
203
- <div class="method-heading">
204
- <span class="method-name">aggregate_children</span><span
205
- class="method-args">()</span>
206
-
207
- <span class="method-click-advice">click to toggle source</span>
208
-
209
- </div>
210
-
211
-
212
- <div class="method-description">
213
-
214
-
215
-
216
-
217
-
218
-
219
- <div class="method-source-code" id="aggregate_children-source">
220
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 120</span>
221
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">aggregate_children</span>
222
- <span class="ruby-comment"># Group call info&#39;s based on their targets</span>
223
- <span class="ruby-identifier">groups</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each_with_object</span>({}) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span>, <span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
224
- <span class="ruby-identifier">key</span> = <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">target</span>
225
- (<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>
226
- <span class="ruby-keyword">end</span>
227
-
228
- <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>
229
- <span class="ruby-constant">AggregateCallInfo</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>)
230
- <span class="ruby-keyword">end</span>
231
- <span class="ruby-keyword">end</span></pre>
232
- </div>
233
-
234
- </div>
235
-
236
-
237
-
238
-
239
- </div>
240
-
241
-
242
- <div id="method-i-aggregate_parents" class="method-detail ">
243
-
244
- <div class="method-heading">
245
- <span class="method-name">aggregate_parents</span><span
246
- class="method-args">()</span>
247
-
248
- <span class="method-click-advice">click to toggle source</span>
249
-
250
- </div>
251
-
252
-
253
- <div class="method-description">
254
-
255
-
256
-
257
-
258
-
259
-
260
- <div class="method-source-code" id="aggregate_parents-source">
261
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 108</span>
262
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">aggregate_parents</span>
263
- <span class="ruby-comment"># Group call info&#39;s based on their parents</span>
264
- <span class="ruby-identifier">groups</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">each_with_object</span>({}) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span>, <span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
265
- <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>
266
- (<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>
267
- <span class="ruby-keyword">end</span>
268
-
269
- <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>
270
- <span class="ruby-constant">AggregateCallInfo</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>)
271
- <span class="ruby-keyword">end</span>
272
- <span class="ruby-keyword">end</span></pre>
273
- </div>
274
-
275
- </div>
276
-
277
-
278
-
279
-
280
- </div>
281
-
282
-
283
- <div id="method-i-called" class="method-detail ">
284
-
285
- <div class="method-heading">
286
- <span class="method-name">called</span><span
287
- class="method-args">()</span>
288
-
289
- <span class="method-click-advice">click to toggle source</span>
290
-
291
- </div>
292
-
293
-
294
- <div class="method-description">
295
-
296
-
297
-
298
-
299
-
300
-
301
- <div class="method-source-code" id="called-source">
302
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 32</span>
303
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">called</span>
304
- <span class="ruby-ivar">@called</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
305
- <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>
306
- <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">called</span>
307
- <span class="ruby-keyword">end</span>
308
- <span class="ruby-keyword">end</span>
309
- <span class="ruby-keyword">end</span></pre>
310
- </div>
311
-
312
- </div>
313
-
314
-
315
-
316
-
317
- </div>
318
-
319
-
320
- <div id="method-i-children" class="method-detail ">
321
-
322
- <div class="method-heading">
323
- <span class="method-name">children</span><span
324
- class="method-args">()</span>
325
-
326
- <span class="method-click-advice">click to toggle source</span>
327
-
328
- </div>
329
-
330
-
331
- <div class="method-description">
332
-
333
-
334
-
335
-
336
-
337
-
338
- <div class="method-source-code" id="children-source">
339
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 100</span>
340
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">children</span>
341
- <span class="ruby-ivar">@children</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:children</span>).<span class="ruby-identifier">flatten</span>
342
- <span class="ruby-keyword">end</span></pre>
343
- </div>
344
-
345
- </div>
346
-
347
-
348
-
349
-
350
- </div>
351
-
352
-
353
- <div id="method-i-children_time" class="method-detail ">
354
-
355
- <div class="method-heading">
356
- <span class="method-name">children_time</span><span
357
- class="method-args">()</span>
358
-
359
- <span class="method-click-advice">click to toggle source</span>
360
-
361
- </div>
362
-
363
-
364
- <div class="method-description">
365
-
366
-
367
-
368
-
369
-
370
-
371
- <div class="method-source-code" id="children_time-source">
372
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 67</span>
373
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">children_time</span>
374
- <span class="ruby-ivar">@children_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
375
- <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>
376
- <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>
377
- <span class="ruby-identifier">sum</span>
378
- <span class="ruby-keyword">end</span>
379
- <span class="ruby-keyword">end</span>
380
- <span class="ruby-keyword">end</span></pre>
381
- </div>
382
-
383
- </div>
384
-
385
-
386
-
387
-
388
- </div>
389
-
390
-
391
- <div id="method-i-clear_cached_values_which_depend_on_recursiveness" class="method-detail ">
392
-
393
- <div class="method-heading">
394
- <span class="method-name">clear_cached_values_which_depend_on_recursiveness</span><span
395
- class="method-args">()</span>
396
-
397
- <span class="method-click-advice">click to toggle source</span>
398
-
399
- </div>
400
-
401
-
402
- <div class="method-description">
403
-
404
-
405
-
406
-
407
-
408
-
409
- <div class="method-source-code" id="clear_cached_values_which_depend_on_recursiveness-source">
410
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 28</span>
411
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">clear_cached_values_which_depend_on_recursiveness</span>
412
- <span class="ruby-ivar">@total_time</span> = <span class="ruby-ivar">@self_time</span> = <span class="ruby-ivar">@wait_time</span> = <span class="ruby-ivar">@children_time</span> = <span class="ruby-keyword">nil</span>
413
- <span class="ruby-keyword">end</span></pre>
414
- </div>
415
-
416
- </div>
417
-
418
-
419
-
420
-
421
- </div>
422
-
423
-
424
- <div id="method-i-detect_recursion" class="method-detail ">
425
-
426
- <div class="method-heading">
427
- <span class="method-name">detect_recursion</span><span
428
- class="method-args">()</span>
429
-
430
- <span class="method-click-advice">click to toggle source</span>
431
-
432
- </div>
433
-
434
-
435
- <div class="method-description">
436
-
437
-
438
-
439
-
440
-
441
-
442
- <div class="method-source-code" id="detect_recursion-source">
443
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 20</span>
444
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">detect_recursion</span>
445
- <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:detect_recursion</span>)
446
- <span class="ruby-keyword">end</span></pre>
447
- </div>
448
-
449
- </div>
450
-
451
-
452
-
453
-
454
- </div>
455
-
456
-
457
- <div id="method-i-eliminate-21" class="method-detail ">
458
-
459
- <div class="method-heading">
460
- <span class="method-name">eliminate!</span><span
461
- class="method-args">()</span>
462
-
463
- <span class="method-click-advice">click to toggle source</span>
464
-
465
- </div>
466
-
467
-
468
- <div class="method-description">
469
-
470
- <p>remove method from the call graph. should not be called directly.</p>
471
-
472
-
473
-
474
-
475
- <div class="method-source-code" id="eliminate-21-source">
476
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 137</span>
477
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">eliminate!</span>
478
- <span class="ruby-comment"># $stderr.puts &quot;eliminating #{self}&quot;</span>
479
- <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> }
480
- <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">clear</span>
481
- <span class="ruby-keyword">end</span></pre>
482
- </div>
483
-
484
- </div>
485
-
486
-
487
-
488
-
489
- </div>
490
-
491
-
492
- <div id="method-i-min_depth" class="method-detail ">
493
-
494
- <div class="method-heading">
495
- <span class="method-name">min_depth</span><span
496
- class="method-args">()</span>
497
-
498
- <span class="method-click-advice">click to toggle source</span>
499
-
500
- </div>
501
-
502
-
503
- <div class="method-description">
504
-
505
-
506
-
507
-
508
-
509
-
510
- <div class="method-source-code" id="min_depth-source">
511
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 76</span>
512
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">min_depth</span>
513
- <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-operator">&amp;</span><span class="ruby-value">:depth</span>).<span class="ruby-identifier">min</span>
514
- <span class="ruby-keyword">end</span></pre>
515
- </div>
516
-
517
- </div>
518
-
519
-
520
-
521
-
522
- </div>
523
-
524
-
525
- <div id="method-i-non_recursive" class="method-detail ">
526
-
527
- <div class="method-heading">
528
- <span class="method-name">non_recursive</span><span
529
- class="method-args">()</span>
530
-
531
- <span class="method-click-advice">click to toggle source</span>
532
-
533
- </div>
534
-
535
-
536
- <div class="method-description">
537
-
538
-
539
-
540
-
541
-
542
-
543
- <div class="method-source-code" id="non_recursive-source">
544
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 96</span>
545
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">non_recursive</span>
546
- <span class="ruby-ivar">@non_recursive</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">all?</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:non_recursive?</span>) <span class="ruby-operator">?</span> <span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>
547
- <span class="ruby-keyword">end</span></pre>
548
- </div>
549
-
550
- </div>
551
-
552
-
553
-
554
-
555
- </div>
556
-
557
-
558
- <div id="method-i-non_recursive-3F" class="method-detail ">
559
-
560
- <div class="method-heading">
561
- <span class="method-name">non_recursive?</span><span
562
- class="method-args">()</span>
563
-
564
- <span class="method-click-advice">click to toggle source</span>
565
-
566
- </div>
567
-
568
-
569
- <div class="method-description">
570
-
571
-
572
-
573
-
574
-
575
-
576
- <div class="method-source-code" id="non_recursive-3F-source">
577
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 92</span>
578
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">non_recursive?</span>
579
- <span class="ruby-identifier">non_recursive</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
580
- <span class="ruby-keyword">end</span></pre>
581
- </div>
582
-
583
- </div>
584
-
585
-
586
-
587
-
588
- </div>
589
-
590
-
591
- <div id="method-i-parents" class="method-detail ">
592
-
593
- <div class="method-heading">
594
- <span class="method-name">parents</span><span
595
- class="method-args">()</span>
596
-
597
- <span class="method-click-advice">click to toggle source</span>
598
-
599
- </div>
600
-
601
-
602
- <div class="method-description">
603
-
604
-
605
-
606
-
607
-
608
-
609
- <div class="method-source-code" id="parents-source">
610
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 104</span>
611
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">parents</span>
612
- <span class="ruby-ivar">@parents</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:parent</span>)
613
- <span class="ruby-keyword">end</span></pre>
614
- </div>
615
-
616
- </div>
617
-
618
-
619
-
620
-
621
- </div>
622
-
623
-
624
- <div id="method-i-recalc_recursion" class="method-detail ">
625
-
626
- <div class="method-heading">
627
- <span class="method-name">recalc_recursion</span><span
628
- class="method-args">()</span>
629
-
630
- <span class="method-click-advice">click to toggle source</span>
631
-
632
- </div>
633
-
634
-
635
- <div class="method-description">
636
-
637
-
638
-
639
-
640
-
641
-
642
- <div class="method-source-code" id="recalc_recursion-source">
643
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 24</span>
644
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">recalc_recursion</span>
645
- <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:recalc_recursion</span>)
646
- <span class="ruby-keyword">end</span></pre>
647
- </div>
648
-
649
- </div>
650
-
651
-
652
-
653
-
654
- </div>
655
-
656
-
657
- <div id="method-i-recursive-3F" class="method-detail ">
658
-
659
- <div class="method-heading">
660
- <span class="method-name">recursive?</span><span
661
- class="method-args">()</span>
662
-
663
- <span class="method-click-advice">click to toggle source</span>
664
-
665
- </div>
666
-
667
-
668
- <div class="method-description">
669
-
670
-
671
-
672
-
673
-
674
-
675
- <div class="method-source-code" id="recursive-3F-source">
676
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 88</span>
677
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">recursive?</span>
678
- <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">detect</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:recursive</span>)
679
- <span class="ruby-keyword">end</span></pre>
680
- </div>
681
-
682
- </div>
683
-
684
-
685
-
686
-
687
- </div>
688
-
689
-
690
- <div id="method-i-root-3F" class="method-detail ">
691
-
692
- <div class="method-heading">
693
- <span class="method-name">root?</span><span
694
- class="method-args">()</span>
695
-
696
- <span class="method-click-advice">click to toggle source</span>
697
-
698
- </div>
699
-
700
-
701
- <div class="method-description">
702
-
703
-
704
-
705
-
706
-
707
-
708
- <div class="method-source-code" id="root-3F-source">
709
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 80</span>
710
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">root?</span>
711
- <span class="ruby-ivar">@root</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
712
- <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>
713
- <span class="ruby-keyword">not</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">root?</span>
714
- <span class="ruby-keyword">end</span>.<span class="ruby-identifier">nil?</span>
715
- <span class="ruby-keyword">end</span>
716
- <span class="ruby-keyword">end</span></pre>
717
- </div>
718
-
719
- </div>
720
-
721
-
722
-
723
-
724
- </div>
725
-
726
-
727
- <div id="method-i-self_time" class="method-detail ">
728
-
729
- <div class="method-heading">
730
- <span class="method-name">self_time</span><span
731
- class="method-args">()</span>
732
-
733
- <span class="method-click-advice">click to toggle source</span>
734
-
735
- </div>
736
-
737
-
738
- <div class="method-description">
739
-
740
-
741
-
742
-
743
-
744
-
745
- <div class="method-source-code" id="self_time-source">
746
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 49</span>
747
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">self_time</span>
748
- <span class="ruby-ivar">@self_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
749
- <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>
750
- <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>
751
- <span class="ruby-identifier">sum</span>
752
- <span class="ruby-keyword">end</span>
753
- <span class="ruby-keyword">end</span>
754
- <span class="ruby-keyword">end</span></pre>
755
- </div>
756
-
757
- </div>
758
-
759
-
760
-
761
-
762
- </div>
763
-
764
-
765
- <div id="method-i-to_s" class="method-detail ">
766
-
767
- <div class="method-heading">
768
- <span class="method-name">to_s</span><span
769
- class="method-args">()</span>
770
-
771
- <span class="method-click-advice">click to toggle source</span>
772
-
773
- </div>
774
-
775
-
776
- <div class="method-description">
777
-
778
-
779
-
780
-
781
-
782
-
783
- <div class="method-source-code" id="to_s-source">
784
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 132</span>
785
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
786
- <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>
787
- <span class="ruby-keyword">end</span></pre>
788
- </div>
789
-
790
- </div>
791
-
792
-
793
-
794
-
795
- </div>
796
-
797
-
798
- <div id="method-i-total_time" class="method-detail ">
799
-
800
- <div class="method-heading">
801
- <span class="method-name">total_time</span><span
802
- class="method-args">()</span>
803
-
804
- <span class="method-click-advice">click to toggle source</span>
805
-
806
- </div>
807
-
808
-
809
- <div class="method-description">
810
-
811
-
812
-
813
-
814
-
815
-
816
- <div class="method-source-code" id="total_time-source">
817
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 40</span>
818
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">total_time</span>
819
- <span class="ruby-ivar">@total_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
820
- <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>
821
- <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>
822
- <span class="ruby-identifier">sum</span>
823
- <span class="ruby-keyword">end</span>
824
- <span class="ruby-keyword">end</span>
825
- <span class="ruby-keyword">end</span></pre>
826
- </div>
827
-
828
- </div>
829
-
830
-
831
-
832
-
833
- </div>
834
-
835
-
836
- <div id="method-i-wait_time" class="method-detail ">
837
-
838
- <div class="method-heading">
839
- <span class="method-name">wait_time</span><span
840
- class="method-args">()</span>
841
-
842
- <span class="method-click-advice">click to toggle source</span>
843
-
844
- </div>
845
-
846
-
847
- <div class="method-description">
848
-
849
-
850
-
851
-
852
-
853
-
854
- <div class="method-source-code" id="wait_time-source">
855
- <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 58</span>
856
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">wait_time</span>
857
- <span class="ruby-ivar">@wait_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
858
- <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>
859
- <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>
860
- <span class="ruby-identifier">sum</span>
861
- <span class="ruby-keyword">end</span>
862
- <span class="ruby-keyword">end</span>
863
- <span class="ruby-keyword">end</span></pre>
864
- </div>
865
-
866
- </div>
867
-
868
-
869
-
870
-
871
- </div>
872
-
873
-
874
- </section>
875
-
876
- </section>
877
- </main>
878
-
879
-
880
- <footer id="validator-badges" role="contentinfo">
881
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
882
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
883
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
884
- </footer>
885
-