ruby-prof 0.12.1 → 0.12.2

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