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,580 +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::AbstractPrinter - 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/abstract_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">Object
|
63
|
-
|
64
|
-
</nav>
|
65
|
-
|
66
|
-
|
67
|
-
<!-- Method Quickref -->
|
68
|
-
<nav id="method-list-section" class="section">
|
69
|
-
<h3 class="section-header">Methods</h3>
|
70
|
-
|
71
|
-
<ul class="link-list">
|
72
|
-
|
73
|
-
<li><a href="#method-c-new">::new</a>
|
74
|
-
|
75
|
-
<li><a href="#method-i-method_name">#method_name</a>
|
76
|
-
|
77
|
-
<li><a href="#method-i-min_percent">#min_percent</a>
|
78
|
-
|
79
|
-
<li><a href="#method-i-print">#print</a>
|
80
|
-
|
81
|
-
<li><a href="#method-i-print_file">#print_file</a>
|
82
|
-
|
83
|
-
<li><a href="#method-i-print_footer">#print_footer</a>
|
84
|
-
|
85
|
-
<li><a href="#method-i-print_header">#print_header</a>
|
86
|
-
|
87
|
-
<li><a href="#method-i-print_thread">#print_thread</a>
|
88
|
-
|
89
|
-
<li><a href="#method-i-print_threads">#print_threads</a>
|
90
|
-
|
91
|
-
<li><a href="#method-i-setup_options">#setup_options</a>
|
92
|
-
|
93
|
-
<li><a href="#method-i-sort_method">#sort_method</a>
|
94
|
-
|
95
|
-
</ul>
|
96
|
-
</nav>
|
97
|
-
|
98
|
-
</div>
|
99
|
-
|
100
|
-
<div id="project-metadata">
|
101
|
-
<nav id="fileindex-section" class="section project-section">
|
102
|
-
<h3 class="section-header">Pages</h3>
|
103
|
-
|
104
|
-
<ul>
|
105
|
-
|
106
|
-
<li class="file"><a href="../LICENSE.html">LICENSE</a>
|
107
|
-
|
108
|
-
<li class="file"><a href="../README_rdoc.html">README</a>
|
109
|
-
|
110
|
-
<li class="file"><a href="../examples/flat_txt.html">flat</a>
|
111
|
-
|
112
|
-
<li class="file"><a href="../examples/graph_txt.html">graph</a>
|
113
|
-
|
114
|
-
</ul>
|
115
|
-
</nav>
|
116
|
-
|
117
|
-
<nav id="classindex-section" class="section project-section">
|
118
|
-
<h3 class="section-header">Class and Module Index</h3>
|
119
|
-
|
120
|
-
<ul class="link-list">
|
121
|
-
|
122
|
-
<li><a href="../RubyProf.html">RubyProf</a>
|
123
|
-
|
124
|
-
<li><a href="../RubyProf/AbstractPrinter.html">RubyProf::AbstractPrinter</a>
|
125
|
-
|
126
|
-
<li><a href="../RubyProf/AggregateCallInfo.html">RubyProf::AggregateCallInfo</a>
|
127
|
-
|
128
|
-
<li><a href="../RubyProf/CallInfo.html">RubyProf::CallInfo</a>
|
129
|
-
|
130
|
-
<li><a href="../RubyProf/CallInfoPrinter.html">RubyProf::CallInfoPrinter</a>
|
131
|
-
|
132
|
-
<li><a href="../RubyProf/CallInfoVisitor.html">RubyProf::CallInfoVisitor</a>
|
133
|
-
|
134
|
-
<li><a href="../RubyProf/CallStackPrinter.html">RubyProf::CallStackPrinter</a>
|
135
|
-
|
136
|
-
<li><a href="../RubyProf/CallTreePrinter.html">RubyProf::CallTreePrinter</a>
|
137
|
-
|
138
|
-
<li><a href="../RubyProf/Cmd.html">RubyProf::Cmd</a>
|
139
|
-
|
140
|
-
<li><a href="../RubyProf/DotPrinter.html">RubyProf::DotPrinter</a>
|
141
|
-
|
142
|
-
<li><a href="../RubyProf/FlatPrinter.html">RubyProf::FlatPrinter</a>
|
143
|
-
|
144
|
-
<li><a href="../RubyProf/FlatPrinterWithLineNumbers.html">RubyProf::FlatPrinterWithLineNumbers</a>
|
145
|
-
|
146
|
-
<li><a href="../RubyProf/GraphHtmlPrinter.html">RubyProf::GraphHtmlPrinter</a>
|
147
|
-
|
148
|
-
<li><a href="../RubyProf/GraphPrinter.html">RubyProf::GraphPrinter</a>
|
149
|
-
|
150
|
-
<li><a href="../RubyProf/MethodInfo.html">RubyProf::MethodInfo</a>
|
151
|
-
|
152
|
-
<li><a href="../RubyProf/MultiPrinter.html">RubyProf::MultiPrinter</a>
|
153
|
-
|
154
|
-
<li><a href="../RubyProf/Profile.html">RubyProf::Profile</a>
|
155
|
-
|
156
|
-
<li><a href="../RubyProf/ProfileTask.html">RubyProf::ProfileTask</a>
|
157
|
-
|
158
|
-
<li><a href="../RubyProf/Test.html">RubyProf::Test</a>
|
159
|
-
|
160
|
-
<li><a href="../RubyProf/Thread.html">RubyProf::Thread</a>
|
161
|
-
|
162
|
-
<li><a href="../Rack.html">Rack</a>
|
163
|
-
|
164
|
-
<li><a href="../Rack/RubyProf.html">Rack::RubyProf</a>
|
165
|
-
|
166
|
-
</ul>
|
167
|
-
</nav>
|
168
|
-
|
169
|
-
</div>
|
170
|
-
</nav>
|
171
|
-
|
172
|
-
<div id="documentation">
|
173
|
-
<h1 class="class">class RubyProf::AbstractPrinter</h1>
|
174
|
-
|
175
|
-
<div id="description" class="description">
|
176
|
-
|
177
|
-
</div><!-- description -->
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
<!-- Methods -->
|
192
|
-
|
193
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
194
|
-
<h3 class="section-header">Public Class Methods</h3>
|
195
|
-
|
196
|
-
|
197
|
-
<div id="method-c-new" class="method-detail ">
|
198
|
-
|
199
|
-
<div class="method-heading">
|
200
|
-
<span class="method-name">new</span><span
|
201
|
-
class="method-args">(result)</span>
|
202
|
-
<span class="method-click-advice">click to toggle source</span>
|
203
|
-
</div>
|
204
|
-
|
205
|
-
|
206
|
-
<div class="method-description">
|
207
|
-
|
208
|
-
<p>Create a new printer.</p>
|
209
|
-
|
210
|
-
<p>result should be the output generated from a profiling run</p>
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
<div class="method-source-code" id="new-source">
|
215
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/abstract_printer.rb, line 7</span>
|
216
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">result</span>)
|
217
|
-
<span class="ruby-ivar">@result</span> = <span class="ruby-identifier">result</span>
|
218
|
-
<span class="ruby-ivar">@output</span> = <span class="ruby-keyword">nil</span>
|
219
|
-
<span class="ruby-keyword">end</span></pre>
|
220
|
-
</div><!-- new-source -->
|
221
|
-
|
222
|
-
</div>
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
</div><!-- new-method -->
|
228
|
-
|
229
|
-
|
230
|
-
</section><!-- public-class-method-details -->
|
231
|
-
|
232
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
233
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
234
|
-
|
235
|
-
|
236
|
-
<div id="method-i-method_name" class="method-detail ">
|
237
|
-
|
238
|
-
<div class="method-heading">
|
239
|
-
<span class="method-name">method_name</span><span
|
240
|
-
class="method-args">(method)</span>
|
241
|
-
<span class="method-click-advice">click to toggle source</span>
|
242
|
-
</div>
|
243
|
-
|
244
|
-
|
245
|
-
<div class="method-description">
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
<div class="method-source-code" id="method_name-source">
|
252
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/abstract_printer.rb, line 44</span>
|
253
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">method_name</span>(<span class="ruby-identifier">method</span>)
|
254
|
-
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">method</span>.<span class="ruby-identifier">full_name</span>
|
255
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">print_file</span>
|
256
|
-
<span class="ruby-identifier">name</span> <span class="ruby-operator">+=</span> <span class="ruby-node">" (#{method.source_file}:#{method.line}}"</span>
|
257
|
-
<span class="ruby-keyword">end</span>
|
258
|
-
<span class="ruby-identifier">name</span>
|
259
|
-
<span class="ruby-keyword">end</span></pre>
|
260
|
-
</div><!-- method_name-source -->
|
261
|
-
|
262
|
-
</div>
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
</div><!-- method_name-method -->
|
268
|
-
|
269
|
-
|
270
|
-
<div id="method-i-min_percent" class="method-detail ">
|
271
|
-
|
272
|
-
<div class="method-heading">
|
273
|
-
<span class="method-name">min_percent</span><span
|
274
|
-
class="method-args">()</span>
|
275
|
-
<span class="method-click-advice">click to toggle source</span>
|
276
|
-
</div>
|
277
|
-
|
278
|
-
|
279
|
-
<div class="method-description">
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
<div class="method-source-code" id="min_percent-source">
|
286
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/abstract_printer.rb, line 32</span>
|
287
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">min_percent</span>
|
288
|
-
<span class="ruby-ivar">@options</span>[<span class="ruby-value">:min_percent</span>] <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
|
289
|
-
<span class="ruby-keyword">end</span></pre>
|
290
|
-
</div><!-- min_percent-source -->
|
291
|
-
|
292
|
-
</div>
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
</div><!-- min_percent-method -->
|
298
|
-
|
299
|
-
|
300
|
-
<div id="method-i-print" class="method-detail ">
|
301
|
-
|
302
|
-
<div class="method-heading">
|
303
|
-
<span class="method-name">print</span><span
|
304
|
-
class="method-args">(output = STDOUT, options = {})</span>
|
305
|
-
<span class="method-click-advice">click to toggle source</span>
|
306
|
-
</div>
|
307
|
-
|
308
|
-
|
309
|
-
<div class="method-description">
|
310
|
-
|
311
|
-
<p>Print a profiling report to the provided output.</p>
|
312
|
-
|
313
|
-
<p>output - Any IO object, including STDOUT or a file. The default value is
|
314
|
-
STDOUT.</p>
|
315
|
-
|
316
|
-
<p>options - Hash of print options. See <a
|
317
|
-
href="AbstractPrinter.html#method-i-setup_options">setup_options</a> for
|
318
|
-
more information. Note that each printer can define its own set of
|
319
|
-
options.</p>
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
<div class="method-source-code" id="print-source">
|
324
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/abstract_printer.rb, line 60</span>
|
325
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print</span>(<span class="ruby-identifier">output</span> = <span class="ruby-constant">STDOUT</span>, <span class="ruby-identifier">options</span> = {})
|
326
|
-
<span class="ruby-ivar">@output</span> = <span class="ruby-identifier">output</span>
|
327
|
-
<span class="ruby-identifier">setup_options</span>(<span class="ruby-identifier">options</span>)
|
328
|
-
<span class="ruby-identifier">print_threads</span>
|
329
|
-
<span class="ruby-keyword">end</span></pre>
|
330
|
-
</div><!-- print-source -->
|
331
|
-
|
332
|
-
</div>
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
</div><!-- print-method -->
|
338
|
-
|
339
|
-
|
340
|
-
<div id="method-i-print_file" class="method-detail ">
|
341
|
-
|
342
|
-
<div class="method-heading">
|
343
|
-
<span class="method-name">print_file</span><span
|
344
|
-
class="method-args">()</span>
|
345
|
-
<span class="method-click-advice">click to toggle source</span>
|
346
|
-
</div>
|
347
|
-
|
348
|
-
|
349
|
-
<div class="method-description">
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
<div class="method-source-code" id="print_file-source">
|
356
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/abstract_printer.rb, line 36</span>
|
357
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_file</span>
|
358
|
-
<span class="ruby-ivar">@options</span>[<span class="ruby-value">:print_file</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword">false</span>
|
359
|
-
<span class="ruby-keyword">end</span></pre>
|
360
|
-
</div><!-- print_file-source -->
|
361
|
-
|
362
|
-
</div>
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
</div><!-- print_file-method -->
|
368
|
-
|
369
|
-
|
370
|
-
<div id="method-i-print_footer" class="method-detail ">
|
371
|
-
|
372
|
-
<div class="method-heading">
|
373
|
-
<span class="method-name">print_footer</span><span
|
374
|
-
class="method-args">(thread)</span>
|
375
|
-
<span class="method-click-advice">click to toggle source</span>
|
376
|
-
</div>
|
377
|
-
|
378
|
-
|
379
|
-
<div class="method-description">
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
<div class="method-source-code" id="print_footer-source">
|
386
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/abstract_printer.rb, line 81</span>
|
387
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_footer</span>(<span class="ruby-identifier">thread</span>)
|
388
|
-
<span class="ruby-keyword">end</span></pre>
|
389
|
-
</div><!-- print_footer-source -->
|
390
|
-
|
391
|
-
</div>
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
</div><!-- print_footer-method -->
|
397
|
-
|
398
|
-
|
399
|
-
<div id="method-i-print_header" class="method-detail ">
|
400
|
-
|
401
|
-
<div class="method-heading">
|
402
|
-
<span class="method-name">print_header</span><span
|
403
|
-
class="method-args">(thread)</span>
|
404
|
-
<span class="method-click-advice">click to toggle source</span>
|
405
|
-
</div>
|
406
|
-
|
407
|
-
|
408
|
-
<div class="method-description">
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
<div class="method-source-code" id="print_header-source">
|
415
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/abstract_printer.rb, line 78</span>
|
416
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_header</span>(<span class="ruby-identifier">thread</span>)
|
417
|
-
<span class="ruby-keyword">end</span></pre>
|
418
|
-
</div><!-- print_header-source -->
|
419
|
-
|
420
|
-
</div>
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
</div><!-- print_header-method -->
|
426
|
-
|
427
|
-
|
428
|
-
<div id="method-i-print_thread" class="method-detail ">
|
429
|
-
|
430
|
-
<div class="method-heading">
|
431
|
-
<span class="method-name">print_thread</span><span
|
432
|
-
class="method-args">(thread)</span>
|
433
|
-
<span class="method-click-advice">click to toggle source</span>
|
434
|
-
</div>
|
435
|
-
|
436
|
-
|
437
|
-
<div class="method-description">
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
<div class="method-source-code" id="print_thread-source">
|
444
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/abstract_printer.rb, line 72</span>
|
445
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_thread</span>(<span class="ruby-identifier">thread</span>)
|
446
|
-
<span class="ruby-identifier">print_header</span>(<span class="ruby-identifier">thread</span>)
|
447
|
-
<span class="ruby-identifier">print_methods</span>(<span class="ruby-identifier">thread</span>)
|
448
|
-
<span class="ruby-identifier">print_footer</span>(<span class="ruby-identifier">thread</span>)
|
449
|
-
<span class="ruby-keyword">end</span></pre>
|
450
|
-
</div><!-- print_thread-source -->
|
451
|
-
|
452
|
-
</div>
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
</div><!-- print_thread-method -->
|
458
|
-
|
459
|
-
|
460
|
-
<div id="method-i-print_threads" class="method-detail ">
|
461
|
-
|
462
|
-
<div class="method-heading">
|
463
|
-
<span class="method-name">print_threads</span><span
|
464
|
-
class="method-args">()</span>
|
465
|
-
<span class="method-click-advice">click to toggle source</span>
|
466
|
-
</div>
|
467
|
-
|
468
|
-
|
469
|
-
<div class="method-description">
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
<div class="method-source-code" id="print_threads-source">
|
476
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/abstract_printer.rb, line 66</span>
|
477
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_threads</span>
|
478
|
-
<span class="ruby-ivar">@result</span>.<span class="ruby-identifier">threads</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">thread</span><span class="ruby-operator">|</span>
|
479
|
-
<span class="ruby-identifier">print_thread</span>(<span class="ruby-identifier">thread</span>)
|
480
|
-
<span class="ruby-keyword">end</span>
|
481
|
-
<span class="ruby-keyword">end</span></pre>
|
482
|
-
</div><!-- print_threads-source -->
|
483
|
-
|
484
|
-
</div>
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
</div><!-- print_threads-method -->
|
490
|
-
|
491
|
-
|
492
|
-
<div id="method-i-setup_options" class="method-detail ">
|
493
|
-
|
494
|
-
<div class="method-heading">
|
495
|
-
<span class="method-name">setup_options</span><span
|
496
|
-
class="method-args">(options = {})</span>
|
497
|
-
<span class="method-click-advice">click to toggle source</span>
|
498
|
-
</div>
|
499
|
-
|
500
|
-
|
501
|
-
<div class="method-description">
|
502
|
-
|
503
|
-
<p>Specify print options.</p>
|
504
|
-
|
505
|
-
<p>options - Hash table</p>
|
506
|
-
|
507
|
-
<pre>:min_percent - Number 0 to 100 that specifes the minimum
|
508
|
-
%self (the methods self time divided by the
|
509
|
-
overall total time) that a method must take
|
510
|
-
for it to be printed out in the report.
|
511
|
-
Default value is 0.
|
512
|
-
|
513
|
-
:print_file - True or false. Specifies if a method's source
|
514
|
-
file should be printed. Default value if false.
|
515
|
-
|
516
|
-
:sort_method - Specifies method used for sorting method infos.
|
517
|
-
Available values are :total_time, :self_time,
|
518
|
-
:wait_time, :children_time
|
519
|
-
Default value is :total_time</pre>
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
<div class="method-source-code" id="setup_options-source">
|
524
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/abstract_printer.rb, line 28</span>
|
525
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">setup_options</span>(<span class="ruby-identifier">options</span> = {})
|
526
|
-
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
|
527
|
-
<span class="ruby-keyword">end</span></pre>
|
528
|
-
</div><!-- setup_options-source -->
|
529
|
-
|
530
|
-
</div>
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
</div><!-- setup_options-method -->
|
536
|
-
|
537
|
-
|
538
|
-
<div id="method-i-sort_method" class="method-detail ">
|
539
|
-
|
540
|
-
<div class="method-heading">
|
541
|
-
<span class="method-name">sort_method</span><span
|
542
|
-
class="method-args">()</span>
|
543
|
-
<span class="method-click-advice">click to toggle source</span>
|
544
|
-
</div>
|
545
|
-
|
546
|
-
|
547
|
-
<div class="method-description">
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
<div class="method-source-code" id="sort_method-source">
|
554
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/abstract_printer.rb, line 40</span>
|
555
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">sort_method</span>
|
556
|
-
<span class="ruby-ivar">@options</span>[<span class="ruby-value">:sort_method</span>] <span class="ruby-operator">||</span> <span class="ruby-value">:total_time</span>
|
557
|
-
<span class="ruby-keyword">end</span></pre>
|
558
|
-
</div><!-- sort_method-source -->
|
559
|
-
|
560
|
-
</div>
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
</div><!-- sort_method-method -->
|
566
|
-
|
567
|
-
|
568
|
-
</section><!-- public-instance-method-details -->
|
569
|
-
|
570
|
-
</section><!-- 5Buntitled-5D -->
|
571
|
-
|
572
|
-
</div><!-- documentation -->
|
573
|
-
|
574
|
-
|
575
|
-
<footer id="validator-badges">
|
576
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
577
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.1.
|
578
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
579
|
-
</footer>
|
580
|
-
|