ruby-prof 0.13.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGES +579 -371
- data/LICENSE +24 -23
- data/README.rdoc +5 -433
- data/Rakefile +98 -110
- data/bin/ruby-prof +328 -329
- data/bin/ruby-prof-check-trace +45 -0
- data/ext/ruby_prof/extconf.rb +16 -59
- data/ext/ruby_prof/rp_aggregate_call_tree.c +59 -0
- data/ext/ruby_prof/rp_aggregate_call_tree.h +13 -0
- data/ext/ruby_prof/rp_allocation.c +287 -0
- data/ext/ruby_prof/rp_allocation.h +31 -0
- data/ext/ruby_prof/rp_call_tree.c +369 -0
- data/ext/ruby_prof/rp_call_tree.h +43 -0
- data/ext/ruby_prof/rp_call_trees.c +288 -0
- data/ext/ruby_prof/rp_call_trees.h +28 -0
- data/ext/ruby_prof/rp_measure_allocations.c +50 -65
- data/ext/ruby_prof/rp_measure_memory.c +42 -73
- data/ext/ruby_prof/rp_measure_process_time.c +65 -71
- data/ext/ruby_prof/rp_measure_wall_time.c +64 -42
- data/ext/ruby_prof/rp_measurement.c +237 -0
- data/ext/ruby_prof/rp_measurement.h +50 -0
- data/ext/ruby_prof/rp_method.c +491 -420
- data/ext/ruby_prof/rp_method.h +62 -57
- data/ext/ruby_prof/rp_profile.c +908 -0
- data/ext/ruby_prof/rp_profile.h +35 -0
- data/ext/ruby_prof/rp_stack.c +212 -128
- data/ext/ruby_prof/rp_stack.h +53 -51
- data/ext/ruby_prof/rp_thread.c +362 -268
- data/ext/ruby_prof/rp_thread.h +39 -27
- data/ext/ruby_prof/ruby_prof.c +52 -695
- data/ext/ruby_prof/ruby_prof.h +26 -55
- data/ext/ruby_prof/vc/ruby_prof.sln +28 -21
- data/ext/ruby_prof/vc/{ruby_prof_20.vcxproj → ruby_prof.vcxproj} +56 -8
- data/lib/ruby-prof.rb +52 -67
- data/lib/ruby-prof/assets/call_stack_printer.html.erb +710 -0
- data/lib/ruby-prof/assets/call_stack_printer.png +0 -0
- data/lib/ruby-prof/assets/graph_printer.html.erb +355 -0
- data/lib/ruby-prof/call_tree.rb +57 -0
- data/lib/ruby-prof/call_tree_visitor.rb +36 -0
- data/lib/ruby-prof/compatibility.rb +99 -169
- data/lib/ruby-prof/exclude_common_methods.rb +198 -0
- data/lib/ruby-prof/measurement.rb +17 -0
- data/lib/ruby-prof/method_info.rb +78 -131
- data/lib/ruby-prof/printers/abstract_printer.rb +137 -85
- data/lib/ruby-prof/printers/call_info_printer.rb +53 -41
- data/lib/ruby-prof/printers/call_stack_printer.rb +180 -773
- data/lib/ruby-prof/printers/call_tree_printer.rb +151 -92
- data/lib/ruby-prof/printers/dot_printer.rb +132 -132
- data/lib/ruby-prof/printers/flat_printer.rb +53 -69
- data/lib/ruby-prof/printers/graph_html_printer.rb +63 -255
- data/lib/ruby-prof/printers/graph_printer.rb +113 -116
- data/lib/ruby-prof/printers/multi_printer.rb +127 -56
- data/lib/ruby-prof/profile.rb +37 -77
- data/lib/ruby-prof/rack.rb +62 -15
- data/lib/ruby-prof/task.rb +147 -147
- data/lib/ruby-prof/thread.rb +10 -12
- data/lib/ruby-prof/version.rb +3 -0
- data/lib/unprof.rb +10 -10
- data/ruby-prof.gemspec +65 -61
- data/test/abstract_printer_test.rb +26 -0
- data/test/alias_test.rb +126 -0
- data/test/basic_test.rb +43 -128
- data/test/call_tree_visitor_test.rb +32 -0
- data/test/call_trees_test.rb +66 -0
- data/test/duplicate_names_test.rb +32 -32
- data/test/dynamic_method_test.rb +53 -74
- data/test/enumerable_test.rb +21 -16
- data/test/exceptions_test.rb +24 -16
- data/test/exclude_methods_test.rb +151 -0
- data/test/exclude_threads_test.rb +53 -54
- data/test/fiber_test.rb +129 -65
- data/test/gc_test.rb +90 -0
- data/test/inverse_call_tree_test.rb +175 -0
- data/test/line_number_test.rb +158 -71
- data/test/marshal_test.rb +113 -0
- data/test/measure_allocations.rb +30 -0
- data/test/measure_allocations_test.rb +375 -25
- data/test/measure_allocations_trace_test.rb +375 -0
- data/test/measure_memory_trace_test.rb +1101 -0
- data/test/measure_process_time_test.rb +785 -62
- data/test/measure_times.rb +56 -0
- data/test/measure_wall_time_test.rb +434 -254
- data/test/multi_printer_test.rb +71 -82
- data/test/no_method_class_test.rb +15 -15
- data/test/pause_resume_test.rb +175 -166
- data/test/prime.rb +54 -54
- data/test/prime_script.rb +6 -0
- data/test/printer_call_stack_test.rb +27 -0
- data/test/printer_call_tree_test.rb +30 -0
- data/test/printer_flat_test.rb +99 -0
- data/test/printer_graph_html_test.rb +59 -0
- data/test/printer_graph_test.rb +40 -0
- data/test/printers_test.rb +141 -257
- data/test/printing_recursive_graph_test.rb +81 -0
- data/test/profile_test.rb +16 -0
- data/test/rack_test.rb +93 -0
- data/test/recursive_test.rb +206 -215
- data/test/singleton_test.rb +38 -38
- data/test/stack_printer_test.rb +64 -78
- data/test/start_stop_test.rb +109 -112
- data/test/test_helper.rb +13 -115
- data/test/thread_test.rb +144 -178
- data/test/unique_call_path_test.rb +120 -224
- data/test/yarv_test.rb +56 -0
- metadata +77 -133
- data/doc/LICENSE.html +0 -155
- data/doc/README_rdoc.html +0 -648
- data/doc/Rack.html +0 -167
- data/doc/Rack/RubyProf.html +0 -319
- data/doc/RubyProf.html +0 -1000
- data/doc/RubyProf/AbstractPrinter.html +0 -580
- data/doc/RubyProf/AggregateCallInfo.html +0 -570
- data/doc/RubyProf/CallInfo.html +0 -512
- data/doc/RubyProf/CallInfoPrinter.html +0 -190
- data/doc/RubyProf/CallInfoVisitor.html +0 -332
- data/doc/RubyProf/CallStackPrinter.html +0 -1600
- data/doc/RubyProf/CallTreePrinter.html +0 -413
- data/doc/RubyProf/Cmd.html +0 -669
- data/doc/RubyProf/DotPrinter.html +0 -312
- data/doc/RubyProf/FlatPrinter.html +0 -229
- data/doc/RubyProf/FlatPrinterWithLineNumbers.html +0 -267
- data/doc/RubyProf/GraphHtmlPrinter.html +0 -630
- data/doc/RubyProf/GraphPrinter.html +0 -209
- data/doc/RubyProf/MethodInfo.html +0 -713
- data/doc/RubyProf/MultiPrinter.html +0 -407
- data/doc/RubyProf/Profile.html +0 -821
- data/doc/RubyProf/ProfileTask.html +0 -532
- data/doc/RubyProf/Test.html +0 -578
- data/doc/RubyProf/Thread.html +0 -262
- data/doc/created.rid +0 -32
- data/doc/examples/flat_txt.html +0 -191
- data/doc/examples/graph_txt.html +0 -305
- data/doc/images/add.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +0 -647
- data/doc/js/darkfish.js +0 -155
- data/doc/js/jquery.js +0 -18
- data/doc/js/navigation.js +0 -142
- data/doc/js/search.js +0 -94
- data/doc/js/search_index.js +0 -1
- data/doc/js/searcher.js +0 -228
- data/doc/rdoc.css +0 -543
- data/doc/table_of_contents.html +0 -462
- data/examples/empty.png +0 -0
- data/examples/flat.txt +0 -55
- data/examples/graph.dot +0 -106
- data/examples/graph.html +0 -823
- data/examples/graph.png +0 -0
- data/examples/graph.txt +0 -170
- data/examples/minus.png +0 -0
- data/examples/multi.flat.txt +0 -23
- data/examples/multi.graph.html +0 -906
- data/examples/multi.grind.dat +0 -194
- data/examples/multi.stack.html +0 -573
- data/examples/plus.png +0 -0
- data/examples/stack.html +0 -573
- data/ext/ruby_prof/rp_call_info.c +0 -407
- data/ext/ruby_prof/rp_call_info.h +0 -48
- data/ext/ruby_prof/rp_measure.c +0 -48
- data/ext/ruby_prof/rp_measure.h +0 -45
- data/ext/ruby_prof/rp_measure_cpu_time.c +0 -112
- data/ext/ruby_prof/rp_measure_gc_runs.c +0 -65
- data/ext/ruby_prof/rp_measure_gc_time.c +0 -57
- data/ext/ruby_prof/vc/ruby_prof_18.vcxproj +0 -108
- data/ext/ruby_prof/vc/ruby_prof_19.vcxproj +0 -110
- data/ext/ruby_prof/version.h +0 -7
- data/lib/ruby-prof/aggregate_call_info.rb +0 -72
- data/lib/ruby-prof/call_info.rb +0 -89
- data/lib/ruby-prof/call_info_visitor.rb +0 -44
- data/lib/ruby-prof/images/empty.png +0 -0
- data/lib/ruby-prof/images/minus.png +0 -0
- data/lib/ruby-prof/images/plus.png +0 -0
- data/lib/ruby-prof/printers/flat_printer_with_line_numbers.rb +0 -57
- data/lib/ruby-prof/test.rb +0 -150
- data/test/aggregate_test.rb +0 -136
- data/test/call_info_test.rb +0 -78
- data/test/call_info_visitor_test.rb +0 -31
- data/test/exec_test.rb +0 -14
- data/test/measure_cpu_time_test.rb +0 -220
- data/test/measure_gc_runs_test.rb +0 -32
- data/test/measure_gc_time_test.rb +0 -36
- data/test/measure_memory_test.rb +0 -31
- data/test/method_elimination_test.rb +0 -84
- data/test/module_test.rb +0 -45
- data/test/stack_test.rb +0 -138
- data/test/test_suite.rb +0 -37
@@ -1,209 +0,0 @@
|
|
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.1.
|
207
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
208
|
-
</footer>
|
209
|
-
|
@@ -1,713 +0,0 @@
|
|
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">#<=></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"><=></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"><=></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"><</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">></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"><</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">></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"><=></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"><<</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"><<</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 "eliminating #{self}"</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">"#{self.full_name} (c: #{self.called}, tt: #{self.total_time}, st: #{self.self_time}, ct: #{self.children_time})"</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.1.
|
711
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
712
|
-
</footer>
|
713
|
-
|