ruby-prof 0.13.1 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +14 -0
- data/README.rdoc +1 -1
- data/Rakefile +2 -3
- data/bin/ruby-prof +4 -4
- data/bin/ruby-prof-check-trace +45 -0
- data/doc/LICENSE.html +49 -88
- data/doc/README_rdoc.html +92 -106
- data/doc/Rack.html +47 -116
- data/doc/Rack/RubyProf.html +119 -174
- data/doc/RubyProf.html +184 -216
- data/doc/RubyProf/AbstractPrinter.html +131 -162
- data/doc/RubyProf/AggregateCallInfo.html +136 -166
- data/doc/RubyProf/CallInfo.html +113 -154
- data/doc/RubyProf/CallInfoPrinter.html +56 -123
- data/doc/RubyProf/CallInfoVisitor.html +87 -216
- data/doc/RubyProf/CallStackPrinter.html +222 -215
- data/doc/RubyProf/CallTreePrinter.html +91 -142
- data/doc/RubyProf/Cmd.html +115 -157
- data/doc/RubyProf/DotPrinter.html +88 -140
- data/doc/RubyProf/FlatPrinter.html +66 -129
- data/doc/RubyProf/FlatPrinterWithLineNumbers.html +69 -132
- data/doc/RubyProf/GraphHtmlPrinter.html +115 -166
- data/doc/RubyProf/GraphPrinter.html +58 -125
- data/doc/RubyProf/MethodInfo.html +147 -172
- data/doc/RubyProf/MultiPrinter.html +104 -150
- data/doc/RubyProf/Profile.html +125 -179
- data/doc/RubyProf/ProfileTask.html +117 -157
- data/doc/RubyProf/Test.html +115 -154
- data/doc/RubyProf/Thread.html +87 -147
- data/doc/created.rid +13 -14
- data/doc/examples/flat_txt.html +51 -90
- data/doc/examples/graph_html.html +852 -0
- data/doc/examples/graph_txt.html +64 -92
- data/doc/fonts.css +167 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/index.html +75 -65
- data/doc/js/darkfish.js +0 -15
- data/doc/js/search.js +20 -5
- data/doc/js/search_index.js +1 -1
- data/doc/rdoc.css +255 -218
- data/doc/table_of_contents.html +751 -353
- data/ext/ruby_prof/extconf.rb +20 -22
- data/ext/ruby_prof/rp_measure_allocations.c +9 -5
- data/ext/ruby_prof/rp_measure_gc_runs.c +8 -0
- data/ext/ruby_prof/rp_measure_gc_time.c +5 -2
- data/ext/ruby_prof/rp_measure_wall_time.c +1 -0
- data/ext/ruby_prof/rp_method.c +0 -9
- data/ext/ruby_prof/rp_method.h +1 -6
- data/ext/ruby_prof/ruby_prof.c +32 -112
- data/ext/ruby_prof/ruby_prof.h +9 -10
- data/lib/ruby-prof.rb +2 -1
- data/lib/ruby-prof/aggregate_call_info.rb +4 -6
- data/lib/ruby-prof/call_info_visitor.rb +42 -44
- data/lib/ruby-prof/printers/graph_html_printer.rb +0 -8
- data/lib/ruby-prof/profile.rb +4 -4
- data/lib/ruby-prof/rack.rb +47 -47
- data/lib/ruby-prof/task.rb +0 -0
- data/lib/ruby-prof/thread.rb +22 -22
- data/lib/ruby-prof/version.rb +3 -0
- data/ruby-prof.gemspec +7 -11
- data/test/call_info_test.rb +78 -78
- data/test/call_info_visitor_test.rb +31 -31
- data/test/fiber_test.rb +2 -2
- data/test/measure_gc_runs_test.rb +1 -1
- data/test/measure_process_time_test.rb +7 -6
- data/test/printers_test.rb +4 -8
- data/test/recursive_test.rb +5 -9
- data/test/test_helper.rb +1 -1
- data/test/unique_call_path_test.rb +7 -29
- data/test/yarv_test.rb +55 -0
- metadata +63 -55
- data/ext/ruby_prof/version.h +0 -7
- data/lib/ruby-prof/test.rb +0 -150
- data/test/exec_test.rb +0 -14
- data/test/test_suite.rb +0 -37
@@ -2,70 +2,71 @@
|
|
2
2
|
|
3
3
|
<html>
|
4
4
|
<head>
|
5
|
-
<meta
|
5
|
+
<meta charset="UTF-8">
|
6
6
|
|
7
7
|
<title>class RubyProf::CallStackPrinter - ruby-prof</title>
|
8
8
|
|
9
|
-
<link
|
9
|
+
<link href="../fonts.css" rel="stylesheet">
|
10
|
+
<link href="../rdoc.css" rel="stylesheet">
|
10
11
|
|
11
12
|
<script type="text/javascript">
|
12
13
|
var rdoc_rel_prefix = "../";
|
13
14
|
</script>
|
14
15
|
|
15
|
-
<script
|
16
|
-
<script
|
17
|
-
<script
|
18
|
-
<script
|
19
|
-
<script
|
20
|
-
<script
|
16
|
+
<script src="../js/jquery.js"></script>
|
17
|
+
<script src="../js/navigation.js"></script>
|
18
|
+
<script src="../js/search_index.js"></script>
|
19
|
+
<script src="../js/search.js"></script>
|
20
|
+
<script src="../js/searcher.js"></script>
|
21
|
+
<script src="../js/darkfish.js"></script>
|
21
22
|
|
22
23
|
|
23
|
-
<body id="top" class="class">
|
24
|
-
<nav
|
25
|
-
<
|
26
|
-
|
27
|
-
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
28
34
|
<a href="../table_of_contents.html#classes">Classes</a>
|
29
35
|
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
-
</
|
31
|
-
</
|
32
|
-
|
36
|
+
</div>
|
37
|
+
</div>
|
33
38
|
|
34
|
-
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
35
40
|
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<
|
37
|
-
<input
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
38
45
|
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</
|
40
|
-
</form>
|
46
|
+
</div>
|
41
47
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<nav id="file-list-section" class="section">
|
48
|
-
<h3 class="section-header">Defined In</h3>
|
49
|
-
<ul>
|
50
|
-
<li>lib/ruby-prof/printers/call_stack_printer.rb
|
51
|
-
</ul>
|
52
|
-
</nav>
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
53
|
|
54
|
-
|
55
54
|
</div>
|
56
55
|
|
56
|
+
|
57
|
+
|
57
58
|
<div id="class-metadata">
|
58
59
|
|
59
|
-
<
|
60
|
-
<h3
|
60
|
+
<div id="parent-class-section" class="nav-section">
|
61
|
+
<h3>Parent</h3>
|
62
|
+
|
61
63
|
|
62
64
|
<p class="link"><a href="AbstractPrinter.html">RubyProf::AbstractPrinter</a>
|
63
65
|
|
64
|
-
</
|
66
|
+
</div>
|
65
67
|
|
66
|
-
|
67
|
-
<
|
68
|
-
<h3 class="section-header">Included Modules</h3>
|
68
|
+
<div id="includes-section" class="nav-section">
|
69
|
+
<h3>Included Modules</h3>
|
69
70
|
|
70
71
|
<ul class="link-list">
|
71
72
|
|
@@ -74,145 +75,77 @@
|
|
74
75
|
|
75
76
|
|
76
77
|
</ul>
|
77
|
-
</
|
78
|
+
</div>
|
78
79
|
|
80
|
+
|
79
81
|
<!-- Method Quickref -->
|
80
|
-
<
|
81
|
-
<h3
|
82
|
+
<div id="method-list-section" class="nav-section">
|
83
|
+
<h3>Methods</h3>
|
82
84
|
|
83
|
-
<ul class="link-list">
|
85
|
+
<ul class="link-list" role="directory">
|
84
86
|
|
85
|
-
<li><a href="#method-i-application">#application</a>
|
87
|
+
<li ><a href="#method-i-application">#application</a>
|
86
88
|
|
87
|
-
<li><a href="#method-i-arguments">#arguments</a>
|
89
|
+
<li ><a href="#method-i-arguments">#arguments</a>
|
88
90
|
|
89
|
-
<li><a href="#method-i-color">#color</a>
|
91
|
+
<li ><a href="#method-i-color">#color</a>
|
90
92
|
|
91
|
-
<li><a href="#method-i-copy_image_files">#copy_image_files</a>
|
93
|
+
<li ><a href="#method-i-copy_image_files">#copy_image_files</a>
|
92
94
|
|
93
|
-
<li><a href="#method-i-dump">#dump</a>
|
95
|
+
<li ><a href="#method-i-dump">#dump</a>
|
94
96
|
|
95
|
-
<li><a href="#method-i-expansion">#expansion</a>
|
97
|
+
<li ><a href="#method-i-expansion">#expansion</a>
|
96
98
|
|
97
|
-
<li><a href="#method-i-graph_link">#graph_link</a>
|
99
|
+
<li ><a href="#method-i-graph_link">#graph_link</a>
|
98
100
|
|
99
|
-
<li><a href="#method-i-link">#link</a>
|
101
|
+
<li ><a href="#method-i-link">#link</a>
|
100
102
|
|
101
|
-
<li><a href="#method-i-method_href">#method_href</a>
|
103
|
+
<li ><a href="#method-i-method_href">#method_href</a>
|
102
104
|
|
103
|
-
<li><a href="#method-i-name">#name</a>
|
105
|
+
<li ><a href="#method-i-name">#name</a>
|
104
106
|
|
105
|
-
<li><a href="#method-i-print">#print</a>
|
107
|
+
<li ><a href="#method-i-print">#print</a>
|
106
108
|
|
107
|
-
<li><a href="#method-i-print_commands">#print_commands</a>
|
109
|
+
<li ><a href="#method-i-print_commands">#print_commands</a>
|
108
110
|
|
109
|
-
<li><a href="#method-i-print_css">#print_css</a>
|
111
|
+
<li ><a href="#method-i-print_css">#print_css</a>
|
110
112
|
|
111
|
-
<li><a href="#method-i-print_footer">#print_footer</a>
|
113
|
+
<li ><a href="#method-i-print_footer">#print_footer</a>
|
112
114
|
|
113
|
-
<li><a href="#method-i-print_header">#print_header</a>
|
115
|
+
<li ><a href="#method-i-print_header">#print_header</a>
|
114
116
|
|
115
|
-
<li><a href="#method-i-print_help">#print_help</a>
|
117
|
+
<li ><a href="#method-i-print_help">#print_help</a>
|
116
118
|
|
117
|
-
<li><a href="#method-i-print_java_script">#print_java_script</a>
|
119
|
+
<li ><a href="#method-i-print_java_script">#print_java_script</a>
|
118
120
|
|
119
|
-
<li><a href="#method-i-print_stack">#print_stack</a>
|
121
|
+
<li ><a href="#method-i-print_stack">#print_stack</a>
|
120
122
|
|
121
|
-
<li><a href="#method-i-print_title_bar">#print_title_bar</a>
|
123
|
+
<li ><a href="#method-i-print_title_bar">#print_title_bar</a>
|
122
124
|
|
123
|
-
<li><a href="#method-i-sum">#sum</a>
|
125
|
+
<li ><a href="#method-i-sum">#sum</a>
|
124
126
|
|
125
|
-
<li><a href="#method-i-threshold">#threshold</a>
|
127
|
+
<li ><a href="#method-i-threshold">#threshold</a>
|
126
128
|
|
127
|
-
<li><a href="#method-i-title">#title</a>
|
129
|
+
<li ><a href="#method-i-title">#title</a>
|
128
130
|
|
129
|
-
<li><a href="#method-i-total_time">#total_time</a>
|
131
|
+
<li ><a href="#method-i-total_time">#total_time</a>
|
130
132
|
|
131
133
|
</ul>
|
132
|
-
</
|
134
|
+
</div>
|
133
135
|
|
134
136
|
</div>
|
135
|
-
|
136
|
-
<div id="project-metadata">
|
137
|
-
<nav id="fileindex-section" class="section project-section">
|
138
|
-
<h3 class="section-header">Pages</h3>
|
139
|
-
|
140
|
-
<ul>
|
141
|
-
|
142
|
-
<li class="file"><a href="../LICENSE.html">LICENSE</a>
|
143
|
-
|
144
|
-
<li class="file"><a href="../README_rdoc.html">README</a>
|
145
|
-
|
146
|
-
<li class="file"><a href="../examples/flat_txt.html">flat</a>
|
147
|
-
|
148
|
-
<li class="file"><a href="../examples/graph_txt.html">graph</a>
|
149
|
-
|
150
|
-
</ul>
|
151
137
|
</nav>
|
152
138
|
|
153
|
-
|
154
|
-
<
|
139
|
+
<main role="main" aria-labelledby="class-RubyProf::CallStackPrinter">
|
140
|
+
<h1 id="class-RubyProf::CallStackPrinter" class="class">
|
141
|
+
class RubyProf::CallStackPrinter
|
142
|
+
</h1>
|
155
143
|
|
156
|
-
<
|
157
|
-
|
158
|
-
<li><a href="../RubyProf.html">RubyProf</a>
|
159
|
-
|
160
|
-
<li><a href="../RubyProf/AbstractPrinter.html">RubyProf::AbstractPrinter</a>
|
161
|
-
|
162
|
-
<li><a href="../RubyProf/AggregateCallInfo.html">RubyProf::AggregateCallInfo</a>
|
163
|
-
|
164
|
-
<li><a href="../RubyProf/CallInfo.html">RubyProf::CallInfo</a>
|
165
|
-
|
166
|
-
<li><a href="../RubyProf/CallInfoPrinter.html">RubyProf::CallInfoPrinter</a>
|
167
|
-
|
168
|
-
<li><a href="../RubyProf/CallInfoVisitor.html">RubyProf::CallInfoVisitor</a>
|
169
|
-
|
170
|
-
<li><a href="../RubyProf/CallStackPrinter.html">RubyProf::CallStackPrinter</a>
|
171
|
-
|
172
|
-
<li><a href="../RubyProf/CallTreePrinter.html">RubyProf::CallTreePrinter</a>
|
173
|
-
|
174
|
-
<li><a href="../RubyProf/Cmd.html">RubyProf::Cmd</a>
|
175
|
-
|
176
|
-
<li><a href="../RubyProf/DotPrinter.html">RubyProf::DotPrinter</a>
|
177
|
-
|
178
|
-
<li><a href="../RubyProf/FlatPrinter.html">RubyProf::FlatPrinter</a>
|
179
|
-
|
180
|
-
<li><a href="../RubyProf/FlatPrinterWithLineNumbers.html">RubyProf::FlatPrinterWithLineNumbers</a>
|
181
|
-
|
182
|
-
<li><a href="../RubyProf/GraphHtmlPrinter.html">RubyProf::GraphHtmlPrinter</a>
|
183
|
-
|
184
|
-
<li><a href="../RubyProf/GraphPrinter.html">RubyProf::GraphPrinter</a>
|
185
|
-
|
186
|
-
<li><a href="../RubyProf/MethodInfo.html">RubyProf::MethodInfo</a>
|
187
|
-
|
188
|
-
<li><a href="../RubyProf/MultiPrinter.html">RubyProf::MultiPrinter</a>
|
189
|
-
|
190
|
-
<li><a href="../RubyProf/Profile.html">RubyProf::Profile</a>
|
191
|
-
|
192
|
-
<li><a href="../RubyProf/ProfileTask.html">RubyProf::ProfileTask</a>
|
193
|
-
|
194
|
-
<li><a href="../RubyProf/Test.html">RubyProf::Test</a>
|
195
|
-
|
196
|
-
<li><a href="../RubyProf/Thread.html">RubyProf::Thread</a>
|
197
|
-
|
198
|
-
<li><a href="../Rack.html">Rack</a>
|
199
|
-
|
200
|
-
<li><a href="../Rack/RubyProf.html">Rack::RubyProf</a>
|
201
|
-
|
202
|
-
</ul>
|
203
|
-
</nav>
|
204
|
-
|
205
|
-
</div>
|
206
|
-
</nav>
|
207
|
-
|
208
|
-
<div id="documentation">
|
209
|
-
<h1 class="class">class RubyProf::CallStackPrinter</h1>
|
210
|
-
|
211
|
-
<div id="description" class="description">
|
144
|
+
<section class="description">
|
212
145
|
|
213
146
|
<p>prints a HTML visualization of the call tree</p>
|
214
147
|
|
215
|
-
</
|
148
|
+
</section>
|
216
149
|
|
217
150
|
|
218
151
|
|
@@ -226,10 +159,11 @@
|
|
226
159
|
|
227
160
|
|
228
161
|
|
229
|
-
<!-- Methods -->
|
230
162
|
|
231
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section
|
232
|
-
|
163
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
164
|
+
<header>
|
165
|
+
<h3>Public Instance Methods</h3>
|
166
|
+
</header>
|
233
167
|
|
234
168
|
|
235
169
|
<div id="method-i-application" class="method-detail ">
|
@@ -237,7 +171,9 @@
|
|
237
171
|
<div class="method-heading">
|
238
172
|
<span class="method-name">application</span><span
|
239
173
|
class="method-args">()</span>
|
174
|
+
|
240
175
|
<span class="method-click-advice">click to toggle source</span>
|
176
|
+
|
241
177
|
</div>
|
242
178
|
|
243
179
|
|
@@ -245,6 +181,7 @@
|
|
245
181
|
|
246
182
|
|
247
183
|
|
184
|
+
|
248
185
|
|
249
186
|
|
250
187
|
<div class="method-source-code" id="application-source">
|
@@ -252,14 +189,14 @@
|
|
252
189
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">application</span>
|
253
190
|
<span class="ruby-ivar">@options</span>[<span class="ruby-value">:application</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">$PROGRAM_NAME</span>
|
254
191
|
<span class="ruby-keyword">end</span></pre>
|
255
|
-
</div
|
192
|
+
</div>
|
256
193
|
|
257
194
|
</div>
|
258
195
|
|
259
196
|
|
260
197
|
|
261
198
|
|
262
|
-
</div
|
199
|
+
</div>
|
263
200
|
|
264
201
|
|
265
202
|
<div id="method-i-arguments" class="method-detail ">
|
@@ -267,7 +204,9 @@
|
|
267
204
|
<div class="method-heading">
|
268
205
|
<span class="method-name">arguments</span><span
|
269
206
|
class="method-args">()</span>
|
207
|
+
|
270
208
|
<span class="method-click-advice">click to toggle source</span>
|
209
|
+
|
271
210
|
</div>
|
272
211
|
|
273
212
|
|
@@ -275,6 +214,7 @@
|
|
275
214
|
|
276
215
|
|
277
216
|
|
217
|
+
|
278
218
|
|
279
219
|
|
280
220
|
<div class="method-source-code" id="arguments-source">
|
@@ -282,14 +222,14 @@
|
|
282
222
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">arguments</span>
|
283
223
|
<span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">' '</span>)
|
284
224
|
<span class="ruby-keyword">end</span></pre>
|
285
|
-
</div
|
225
|
+
</div>
|
286
226
|
|
287
227
|
</div>
|
288
228
|
|
289
229
|
|
290
230
|
|
291
231
|
|
292
|
-
</div
|
232
|
+
</div>
|
293
233
|
|
294
234
|
|
295
235
|
<div id="method-i-color" class="method-detail ">
|
@@ -297,7 +237,9 @@
|
|
297
237
|
<div class="method-heading">
|
298
238
|
<span class="method-name">color</span><span
|
299
239
|
class="method-args">(p)</span>
|
240
|
+
|
300
241
|
<span class="method-click-advice">click to toggle source</span>
|
242
|
+
|
301
243
|
</div>
|
302
244
|
|
303
245
|
|
@@ -305,6 +247,7 @@
|
|
305
247
|
|
306
248
|
|
307
249
|
|
250
|
+
|
308
251
|
|
309
252
|
|
310
253
|
<div class="method-source-code" id="color-source">
|
@@ -321,14 +264,14 @@
|
|
321
264
|
<span class="ruby-node">"#{i/10}"</span>
|
322
265
|
<span class="ruby-keyword">end</span>
|
323
266
|
<span class="ruby-keyword">end</span></pre>
|
324
|
-
</div
|
267
|
+
</div>
|
325
268
|
|
326
269
|
</div>
|
327
270
|
|
328
271
|
|
329
272
|
|
330
273
|
|
331
|
-
</div
|
274
|
+
</div>
|
332
275
|
|
333
276
|
|
334
277
|
<div id="method-i-copy_image_files" class="method-detail ">
|
@@ -336,7 +279,9 @@
|
|
336
279
|
<div class="method-heading">
|
337
280
|
<span class="method-name">copy_image_files</span><span
|
338
281
|
class="method-args">()</span>
|
282
|
+
|
339
283
|
<span class="method-click-advice">click to toggle source</span>
|
284
|
+
|
340
285
|
</div>
|
341
286
|
|
342
287
|
|
@@ -344,6 +289,7 @@
|
|
344
289
|
|
345
290
|
|
346
291
|
|
292
|
+
|
347
293
|
|
348
294
|
|
349
295
|
<div class="method-source-code" id="copy_image_files-source">
|
@@ -359,14 +305,14 @@
|
|
359
305
|
<span class="ruby-keyword">end</span>
|
360
306
|
<span class="ruby-keyword">end</span>
|
361
307
|
<span class="ruby-keyword">end</span></pre>
|
362
|
-
</div
|
308
|
+
</div>
|
363
309
|
|
364
310
|
</div>
|
365
311
|
|
366
312
|
|
367
313
|
|
368
314
|
|
369
|
-
</div
|
315
|
+
</div>
|
370
316
|
|
371
317
|
|
372
318
|
<div id="method-i-dump" class="method-detail ">
|
@@ -374,7 +320,9 @@
|
|
374
320
|
<div class="method-heading">
|
375
321
|
<span class="method-name">dump</span><span
|
376
322
|
class="method-args">(ci)</span>
|
323
|
+
|
377
324
|
<span class="method-click-advice">click to toggle source</span>
|
325
|
+
|
378
326
|
</div>
|
379
327
|
|
380
328
|
|
@@ -382,6 +330,7 @@
|
|
382
330
|
|
383
331
|
|
384
332
|
|
333
|
+
|
385
334
|
|
386
335
|
|
387
336
|
<div class="method-source-code" id="dump-source">
|
@@ -389,14 +338,14 @@
|
|
389
338
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">dump</span>(<span class="ruby-identifier">ci</span>)
|
390
339
|
<span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">printf</span> <span class="ruby-string">"%s/%d t:%f s:%f w:%f \n"</span>, <span class="ruby-identifier">ci</span>, <span class="ruby-identifier">ci</span>.<span class="ruby-identifier">object_id</span>, <span class="ruby-identifier">ci</span>.<span class="ruby-identifier">total_time</span>, <span class="ruby-identifier">ci</span>.<span class="ruby-identifier">self_time</span>, <span class="ruby-identifier">ci</span>.<span class="ruby-identifier">wait_time</span>
|
391
340
|
<span class="ruby-keyword">end</span></pre>
|
392
|
-
</div
|
341
|
+
</div>
|
393
342
|
|
394
343
|
</div>
|
395
344
|
|
396
345
|
|
397
346
|
|
398
347
|
|
399
|
-
</div
|
348
|
+
</div>
|
400
349
|
|
401
350
|
|
402
351
|
<div id="method-i-expansion" class="method-detail ">
|
@@ -404,7 +353,9 @@
|
|
404
353
|
<div class="method-heading">
|
405
354
|
<span class="method-name">expansion</span><span
|
406
355
|
class="method-args">()</span>
|
356
|
+
|
407
357
|
<span class="method-click-advice">click to toggle source</span>
|
358
|
+
|
408
359
|
</div>
|
409
360
|
|
410
361
|
|
@@ -412,6 +363,7 @@
|
|
412
363
|
|
413
364
|
|
414
365
|
|
366
|
+
|
415
367
|
|
416
368
|
|
417
369
|
<div class="method-source-code" id="expansion-source">
|
@@ -419,14 +371,14 @@
|
|
419
371
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">expansion</span>
|
420
372
|
<span class="ruby-ivar">@options</span>[<span class="ruby-value">:expansion</span>] <span class="ruby-operator">||</span> <span class="ruby-value">10.0</span>
|
421
373
|
<span class="ruby-keyword">end</span></pre>
|
422
|
-
</div
|
374
|
+
</div>
|
423
375
|
|
424
376
|
</div>
|
425
377
|
|
426
378
|
|
427
379
|
|
428
380
|
|
429
|
-
</div
|
381
|
+
</div>
|
430
382
|
|
431
383
|
|
432
384
|
<div id="method-i-graph_link" class="method-detail ">
|
@@ -434,7 +386,9 @@
|
|
434
386
|
<div class="method-heading">
|
435
387
|
<span class="method-name">graph_link</span><span
|
436
388
|
class="method-args">(call_info)</span>
|
389
|
+
|
437
390
|
<span class="method-click-advice">click to toggle source</span>
|
391
|
+
|
438
392
|
</div>
|
439
393
|
|
440
394
|
|
@@ -442,6 +396,7 @@
|
|
442
396
|
|
443
397
|
|
444
398
|
|
399
|
+
|
445
400
|
|
446
401
|
|
447
402
|
<div class="method-source-code" id="graph_link-source">
|
@@ -452,14 +407,14 @@
|
|
452
407
|
<span class="ruby-identifier">totals</span> = <span class="ruby-ivar">@graph_html</span> <span class="ruby-operator">?</span> <span class="ruby-node">"<a href='#{href}'>#{total_calls}</a>"</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">total_calls</span>.<span class="ruby-identifier">to_s</span>
|
453
408
|
<span class="ruby-node">"[#{call_info.called} calls, #{totals} total]"</span>
|
454
409
|
<span class="ruby-keyword">end</span></pre>
|
455
|
-
</div
|
410
|
+
</div>
|
456
411
|
|
457
412
|
</div>
|
458
413
|
|
459
414
|
|
460
415
|
|
461
416
|
|
462
|
-
</div
|
417
|
+
</div>
|
463
418
|
|
464
419
|
|
465
420
|
<div id="method-i-link" class="method-detail ">
|
@@ -467,7 +422,9 @@
|
|
467
422
|
<div class="method-heading">
|
468
423
|
<span class="method-name">link</span><span
|
469
424
|
class="method-args">(call_info)</span>
|
425
|
+
|
470
426
|
<span class="method-click-advice">click to toggle source</span>
|
427
|
+
|
471
428
|
</div>
|
472
429
|
|
473
430
|
|
@@ -475,6 +432,7 @@
|
|
475
432
|
|
476
433
|
|
477
434
|
|
435
|
+
|
478
436
|
|
479
437
|
|
480
438
|
<div class="method-source-code" id="link-source">
|
@@ -482,24 +440,24 @@
|
|
482
440
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">link</span>(<span class="ruby-identifier">call_info</span>)
|
483
441
|
<span class="ruby-identifier">method</span> = <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">target</span>
|
484
442
|
<span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">method</span>.<span class="ruby-identifier">source_file</span>)
|
485
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">file</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp"
|
443
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">file</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/\/ruby_runtime$/</span>
|
486
444
|
<span class="ruby-identifier">h</span>(<span class="ruby-identifier">name</span>(<span class="ruby-identifier">call_info</span>))
|
487
445
|
<span class="ruby-keyword">else</span>
|
488
|
-
<span class="ruby-keyword">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp"
|
446
|
+
<span class="ruby-keyword">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/darwin/</span>
|
489
447
|
<span class="ruby-node">"<a href=\"txmt://open?url=file://#{file}&line=#{method.line}\">#{h(name(call_info))}</a>"</span>
|
490
448
|
<span class="ruby-keyword">else</span>
|
491
449
|
<span class="ruby-node">"<a href=\"file://#{file}##{method.line}\">#{h(name(call_info))}</a>"</span>
|
492
450
|
<span class="ruby-keyword">end</span>
|
493
451
|
<span class="ruby-keyword">end</span>
|
494
452
|
<span class="ruby-keyword">end</span></pre>
|
495
|
-
</div
|
453
|
+
</div>
|
496
454
|
|
497
455
|
</div>
|
498
456
|
|
499
457
|
|
500
458
|
|
501
459
|
|
502
|
-
</div
|
460
|
+
</div>
|
503
461
|
|
504
462
|
|
505
463
|
<div id="method-i-method_href" class="method-detail ">
|
@@ -507,7 +465,9 @@
|
|
507
465
|
<div class="method-heading">
|
508
466
|
<span class="method-name">method_href</span><span
|
509
467
|
class="method-args">(method)</span>
|
468
|
+
|
510
469
|
<span class="method-click-advice">click to toggle source</span>
|
470
|
+
|
511
471
|
</div>
|
512
472
|
|
513
473
|
|
@@ -515,21 +475,22 @@
|
|
515
475
|
|
516
476
|
|
517
477
|
|
478
|
+
|
518
479
|
|
519
480
|
|
520
481
|
<div class="method-source-code" id="method_href-source">
|
521
482
|
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/call_stack_printer.rb, line 133</span>
|
522
483
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">method_href</span>(<span class="ruby-identifier">method</span>)
|
523
|
-
<span class="ruby-identifier">h</span>(<span class="ruby-identifier">method</span>.<span class="ruby-identifier">full_name</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node"
|
484
|
+
<span class="ruby-identifier">h</span>(<span class="ruby-identifier">method</span>.<span class="ruby-identifier">full_name</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/[><#\.\?=:]/</span>,<span class="ruby-string">"_"</span>) <span class="ruby-operator">+</span> <span class="ruby-string">"_"</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@current_thread_id</span>.<span class="ruby-identifier">to_s</span>)
|
524
485
|
<span class="ruby-keyword">end</span></pre>
|
525
|
-
</div
|
486
|
+
</div>
|
526
487
|
|
527
488
|
</div>
|
528
489
|
|
529
490
|
|
530
491
|
|
531
492
|
|
532
|
-
</div
|
493
|
+
</div>
|
533
494
|
|
534
495
|
|
535
496
|
<div id="method-i-name" class="method-detail ">
|
@@ -537,7 +498,9 @@
|
|
537
498
|
<div class="method-heading">
|
538
499
|
<span class="method-name">name</span><span
|
539
500
|
class="method-args">(call_info)</span>
|
501
|
+
|
540
502
|
<span class="method-click-advice">click to toggle source</span>
|
503
|
+
|
541
504
|
</div>
|
542
505
|
|
543
506
|
|
@@ -545,6 +508,7 @@
|
|
545
508
|
|
546
509
|
|
547
510
|
|
511
|
+
|
548
512
|
|
549
513
|
|
550
514
|
<div class="method-source-code" id="name-source">
|
@@ -553,14 +517,14 @@
|
|
553
517
|
<span class="ruby-identifier">method</span> = <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">target</span>
|
554
518
|
<span class="ruby-identifier">method</span>.<span class="ruby-identifier">full_name</span>
|
555
519
|
<span class="ruby-keyword">end</span></pre>
|
556
|
-
</div
|
520
|
+
</div>
|
557
521
|
|
558
522
|
</div>
|
559
523
|
|
560
524
|
|
561
525
|
|
562
526
|
|
563
|
-
</div
|
527
|
+
</div>
|
564
528
|
|
565
529
|
|
566
530
|
<div id="method-i-print" class="method-detail ">
|
@@ -568,7 +532,9 @@
|
|
568
532
|
<div class="method-heading">
|
569
533
|
<span class="method-name">print</span><span
|
570
534
|
class="method-args">(output = STDOUT, options = {})</span>
|
535
|
+
|
571
536
|
<span class="method-click-advice">click to toggle source</span>
|
537
|
+
|
572
538
|
</div>
|
573
539
|
|
574
540
|
|
@@ -602,6 +568,7 @@
|
|
602
568
|
:application - a String to overide the name of the application,
|
603
569
|
as it appears on the report.</pre>
|
604
570
|
|
571
|
+
|
605
572
|
|
606
573
|
|
607
574
|
<div class="method-source-code" id="print-source">
|
@@ -642,14 +609,14 @@
|
|
642
609
|
|
643
610
|
<span class="ruby-identifier">copy_image_files</span>
|
644
611
|
<span class="ruby-keyword">end</span></pre>
|
645
|
-
</div
|
612
|
+
</div>
|
646
613
|
|
647
614
|
</div>
|
648
615
|
|
649
616
|
|
650
617
|
|
651
618
|
|
652
|
-
</div
|
619
|
+
</div>
|
653
620
|
|
654
621
|
|
655
622
|
<div id="method-i-print_commands" class="method-detail ">
|
@@ -657,7 +624,9 @@
|
|
657
624
|
<div class="method-heading">
|
658
625
|
<span class="method-name">print_commands</span><span
|
659
626
|
class="method-args">()</span>
|
627
|
+
|
660
628
|
<span class="method-click-advice">click to toggle source</span>
|
629
|
+
|
661
630
|
</div>
|
662
631
|
|
663
632
|
|
@@ -665,12 +634,14 @@
|
|
665
634
|
|
666
635
|
|
667
636
|
|
637
|
+
|
668
638
|
|
669
639
|
|
670
640
|
<div class="method-source-code" id="print_commands-source">
|
671
641
|
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/call_stack_printer.rb, line 740</span>
|
672
642
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_commands</span>
|
673
|
-
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-
|
643
|
+
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value"><<-"end_commands"
|
644
|
+
<div id=\"commands\">
|
674
645
|
<span style=\"font-size: 11pt; font-weight: bold;\">Threshold:</span>
|
675
646
|
<input value=\"#{h threshold}\" size=\"3\" id=\"threshold\" type=\"text\">
|
676
647
|
<input value=\"Apply\" onclick=\"setThreshold();\" type=\"submit\">
|
@@ -678,16 +649,16 @@
|
|
678
649
|
<input value=\"Collapse All\" onclick=\"collapseAll(event);\" type=\"submit\">
|
679
650
|
<input value=\"Show Help\" onclick=\"toggleHelp(this);\" type=\"submit\">
|
680
651
|
</div>
|
681
|
-
|
652
|
+
end_commands</span>
|
682
653
|
<span class="ruby-keyword">end</span></pre>
|
683
|
-
</div
|
654
|
+
</div>
|
684
655
|
|
685
656
|
</div>
|
686
657
|
|
687
658
|
|
688
659
|
|
689
660
|
|
690
|
-
</div
|
661
|
+
</div>
|
691
662
|
|
692
663
|
|
693
664
|
<div id="method-i-print_css" class="method-detail ">
|
@@ -695,7 +666,9 @@
|
|
695
666
|
<div class="method-heading">
|
696
667
|
<span class="method-name">print_css</span><span
|
697
668
|
class="method-args">()</span>
|
669
|
+
|
698
670
|
<span class="method-click-advice">click to toggle source</span>
|
671
|
+
|
699
672
|
</div>
|
700
673
|
|
701
674
|
|
@@ -703,12 +676,14 @@
|
|
703
676
|
|
704
677
|
|
705
678
|
|
679
|
+
|
706
680
|
|
707
681
|
|
708
682
|
<div class="method-source-code" id="print_css-source">
|
709
683
|
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/call_stack_printer.rb, line 210</span>
|
710
684
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_css</span>
|
711
|
-
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-
|
685
|
+
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value"><<-'end_css'
|
686
|
+
<style type="text/css">
|
712
687
|
<!--
|
713
688
|
body {
|
714
689
|
font-size:70%;
|
@@ -808,16 +783,16 @@ li {
|
|
808
783
|
input { margin-left:10px; }
|
809
784
|
-->
|
810
785
|
</style>
|
811
|
-
|
786
|
+
end_css</span>
|
812
787
|
<span class="ruby-keyword">end</span></pre>
|
813
|
-
</div
|
788
|
+
</div>
|
814
789
|
|
815
790
|
</div>
|
816
791
|
|
817
792
|
|
818
793
|
|
819
794
|
|
820
|
-
</div
|
795
|
+
</div>
|
821
796
|
|
822
797
|
|
823
798
|
<div id="method-i-print_footer" class="method-detail ">
|
@@ -825,7 +800,9 @@ input { margin-left:10px; }
|
|
825
800
|
<div class="method-heading">
|
826
801
|
<span class="method-name">print_footer</span><span
|
827
802
|
class="method-args">()</span>
|
803
|
+
|
828
804
|
<span class="method-click-advice">click to toggle source</span>
|
805
|
+
|
829
806
|
</div>
|
830
807
|
|
831
808
|
|
@@ -833,6 +810,7 @@ input { margin-left:10px; }
|
|
833
810
|
|
834
811
|
|
835
812
|
|
813
|
+
|
836
814
|
|
837
815
|
|
838
816
|
<div class="method-source-code" id="print_footer-source">
|
@@ -840,14 +818,14 @@ input { margin-left:10px; }
|
|
840
818
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_footer</span>
|
841
819
|
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">'<div id="sentinel"></div></div></body></html>'</span>
|
842
820
|
<span class="ruby-keyword">end</span></pre>
|
843
|
-
</div
|
821
|
+
</div>
|
844
822
|
|
845
823
|
</div>
|
846
824
|
|
847
825
|
|
848
826
|
|
849
827
|
|
850
|
-
</div
|
828
|
+
</div>
|
851
829
|
|
852
830
|
|
853
831
|
<div id="method-i-print_header" class="method-detail ">
|
@@ -855,7 +833,9 @@ input { margin-left:10px; }
|
|
855
833
|
<div class="method-heading">
|
856
834
|
<span class="method-name">print_header</span><span
|
857
835
|
class="method-args">()</span>
|
836
|
+
|
858
837
|
<span class="method-click-advice">click to toggle source</span>
|
838
|
+
|
859
839
|
</div>
|
860
840
|
|
861
841
|
|
@@ -863,6 +843,7 @@ input { margin-left:10px; }
|
|
863
843
|
|
864
844
|
|
865
845
|
|
846
|
+
|
866
847
|
|
867
848
|
|
868
849
|
<div class="method-source-code" id="print_header-source">
|
@@ -878,14 +859,14 @@ input { margin-left:10px; }
|
|
878
859
|
<span class="ruby-identifier">print_commands</span>
|
879
860
|
<span class="ruby-identifier">print_help</span>
|
880
861
|
<span class="ruby-keyword">end</span></pre>
|
881
|
-
</div
|
862
|
+
</div>
|
882
863
|
|
883
864
|
</div>
|
884
865
|
|
885
866
|
|
886
867
|
|
887
868
|
|
888
|
-
</div
|
869
|
+
</div>
|
889
870
|
|
890
871
|
|
891
872
|
<div id="method-i-print_help" class="method-detail ">
|
@@ -893,7 +874,9 @@ input { margin-left:10px; }
|
|
893
874
|
<div class="method-heading">
|
894
875
|
<span class="method-name">print_help</span><span
|
895
876
|
class="method-args">()</span>
|
877
|
+
|
896
878
|
<span class="method-click-advice">click to toggle source</span>
|
879
|
+
|
897
880
|
</div>
|
898
881
|
|
899
882
|
|
@@ -901,12 +884,14 @@ input { margin-left:10px; }
|
|
901
884
|
|
902
885
|
|
903
886
|
|
887
|
+
|
904
888
|
|
905
889
|
|
906
890
|
<div class="method-source-code" id="print_help-source">
|
907
891
|
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/call_stack_printer.rb, line 753</span>
|
908
892
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_help</span>
|
909
|
-
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-
|
893
|
+
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value"><<-'end_help'
|
894
|
+
<div style="display: none;" id="help">
|
910
895
|
<img src="empty.png"> Enter a decimal value <i>d</i> into the threshold field and click "Apply"
|
911
896
|
to hide all nodes marked with time values lower than <i>d</i>.<br>
|
912
897
|
<img src="empty.png"> Click on "Expand All" for full tree expansion.<br>
|
@@ -919,16 +904,16 @@ to hide all nodes marked with time values lower than <i>d</i>.<br
|
|
919
904
|
<img src="empty.png"> Use n and p to navigate between threads.<br>
|
920
905
|
<img src="empty.png"> Click on background to move focus to a subtree.<br>
|
921
906
|
</div>
|
922
|
-
|
907
|
+
end_help</span>
|
923
908
|
<span class="ruby-keyword">end</span></pre>
|
924
|
-
</div
|
909
|
+
</div>
|
925
910
|
|
926
911
|
</div>
|
927
912
|
|
928
913
|
|
929
914
|
|
930
915
|
|
931
|
-
</div
|
916
|
+
</div>
|
932
917
|
|
933
918
|
|
934
919
|
<div id="method-i-print_java_script" class="method-detail ">
|
@@ -936,7 +921,9 @@ to hide all nodes marked with time values lower than <i>d</i>.<br
|
|
936
921
|
<div class="method-heading">
|
937
922
|
<span class="method-name">print_java_script</span><span
|
938
923
|
class="method-args">()</span>
|
924
|
+
|
939
925
|
<span class="method-click-advice">click to toggle source</span>
|
926
|
+
|
940
927
|
</div>
|
941
928
|
|
942
929
|
|
@@ -944,12 +931,14 @@ to hide all nodes marked with time values lower than <i>d</i>.<br
|
|
944
931
|
|
945
932
|
|
946
933
|
|
934
|
+
|
947
935
|
|
948
936
|
|
949
937
|
<div class="method-source-code" id="print_java_script-source">
|
950
938
|
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/call_stack_printer.rb, line 315</span>
|
951
939
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_java_script</span>
|
952
|
-
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-
|
940
|
+
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value"><<-'end_java_script'
|
941
|
+
<script type="text/javascript">
|
953
942
|
/*
|
954
943
|
Copyright (C) 2005,2009 Stefan Kaes
|
955
944
|
skaes@railsexpress.de
|
@@ -1360,16 +1349,16 @@ window.onload=function(){
|
|
1360
1349
|
selectNode(currentThread, null);
|
1361
1350
|
}
|
1362
1351
|
</script>
|
1363
|
-
|
1352
|
+
end_java_script</span>
|
1364
1353
|
<span class="ruby-keyword">end</span></pre>
|
1365
|
-
</div
|
1354
|
+
</div>
|
1366
1355
|
|
1367
1356
|
</div>
|
1368
1357
|
|
1369
1358
|
|
1370
1359
|
|
1371
1360
|
|
1372
|
-
</div
|
1361
|
+
</div>
|
1373
1362
|
|
1374
1363
|
|
1375
1364
|
<div id="method-i-print_stack" class="method-detail ">
|
@@ -1377,7 +1366,9 @@ window.onload=function(){
|
|
1377
1366
|
<div class="method-heading">
|
1378
1367
|
<span class="method-name">print_stack</span><span
|
1379
1368
|
class="method-args">(call_info, parent_time)</span>
|
1369
|
+
|
1380
1370
|
<span class="method-click-advice">click to toggle source</span>
|
1371
|
+
|
1381
1372
|
</div>
|
1382
1373
|
|
1383
1374
|
|
@@ -1385,14 +1376,15 @@ window.onload=function(){
|
|
1385
1376
|
|
1386
1377
|
|
1387
1378
|
|
1379
|
+
|
1388
1380
|
|
1389
1381
|
|
1390
1382
|
<div class="method-source-code" id="print_stack-source">
|
1391
1383
|
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/call_stack_printer.rb, line 74</span>
|
1392
1384
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_stack</span>(<span class="ruby-identifier">call_info</span>, <span class="ruby-identifier">parent_time</span>)
|
1393
1385
|
<span class="ruby-identifier">total_time</span> = <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">total_time</span>
|
1394
|
-
<span class="ruby-identifier">percent_parent</span> = (<span class="ruby-identifier">total_time</span><span class="ruby-operator">/</span><span class="ruby-identifier">parent_time</span>)
|
1395
|
-
<span class="ruby-identifier">percent_total</span> = (<span class="ruby-identifier">total_time</span><span class="ruby-operator">/</span><span class="ruby-ivar">@overall_time</span>)
|
1386
|
+
<span class="ruby-identifier">percent_parent</span> = (<span class="ruby-identifier">total_time</span><span class="ruby-operator">/</span><span class="ruby-identifier">parent_time</span>)<span class="ruby-operator">*</span><span class="ruby-value">100</span>
|
1387
|
+
<span class="ruby-identifier">percent_total</span> = (<span class="ruby-identifier">total_time</span><span class="ruby-operator">/</span><span class="ruby-ivar">@overall_time</span>)<span class="ruby-operator">*</span><span class="ruby-value">100</span>
|
1396
1388
|
<span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">percent_total</span> <span class="ruby-operator">></span> <span class="ruby-identifier">min_percent</span>
|
1397
1389
|
<span class="ruby-identifier">color</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">color</span>(<span class="ruby-identifier">percent_total</span>)
|
1398
1390
|
<span class="ruby-identifier">kids</span> = <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">children</span>
|
@@ -1403,7 +1395,7 @@ window.onload=function(){
|
|
1403
1395
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">kids</span>.<span class="ruby-identifier">empty?</span>
|
1404
1396
|
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">print</span> <span class="ruby-string">"<img src=\"empty.png\">"</span>
|
1405
1397
|
<span class="ruby-keyword">else</span>
|
1406
|
-
<span class="ruby-identifier">visible_children</span> = <span class="ruby-identifier">kids</span>.<span class="ruby-identifier">any?</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">ci</span><span class="ruby-operator">|</span> (<span class="ruby-identifier">ci</span>.<span class="ruby-identifier">total_time</span><span class="ruby-operator">/</span><span class="ruby-ivar">@overall_time</span>)
|
1398
|
+
<span class="ruby-identifier">visible_children</span> = <span class="ruby-identifier">kids</span>.<span class="ruby-identifier">any?</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">ci</span><span class="ruby-operator">|</span> (<span class="ruby-identifier">ci</span>.<span class="ruby-identifier">total_time</span><span class="ruby-operator">/</span><span class="ruby-ivar">@overall_time</span>)<span class="ruby-operator">*</span><span class="ruby-value">100</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">threshold</span>}
|
1407
1399
|
<span class="ruby-identifier">image</span> = <span class="ruby-identifier">visible_children</span> <span class="ruby-operator">?</span> (<span class="ruby-identifier">expanded</span> <span class="ruby-operator">?</span> <span class="ruby-string">"minus"</span> <span class="ruby-operator">:</span> <span class="ruby-string">"plus"</span>) <span class="ruby-operator">:</span> <span class="ruby-string">"empty"</span>
|
1408
1400
|
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">print</span> <span class="ruby-node">"<img class=\"toggle\" src=\"#{image}.png\">"</span>
|
1409
1401
|
<span class="ruby-keyword">end</span>
|
@@ -1421,14 +1413,14 @@ window.onload=function(){
|
|
1421
1413
|
<span class="ruby-keyword">end</span>
|
1422
1414
|
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">print</span> <span class="ruby-string">"</li>"</span>
|
1423
1415
|
<span class="ruby-keyword">end</span></pre>
|
1424
|
-
</div
|
1416
|
+
</div>
|
1425
1417
|
|
1426
1418
|
</div>
|
1427
1419
|
|
1428
1420
|
|
1429
1421
|
|
1430
1422
|
|
1431
|
-
</div
|
1423
|
+
</div>
|
1432
1424
|
|
1433
1425
|
|
1434
1426
|
<div id="method-i-print_title_bar" class="method-detail ">
|
@@ -1436,7 +1428,9 @@ window.onload=function(){
|
|
1436
1428
|
<div class="method-heading">
|
1437
1429
|
<span class="method-name">print_title_bar</span><span
|
1438
1430
|
class="method-args">()</span>
|
1431
|
+
|
1439
1432
|
<span class="method-click-advice">click to toggle source</span>
|
1433
|
+
|
1440
1434
|
</div>
|
1441
1435
|
|
1442
1436
|
|
@@ -1444,25 +1438,27 @@ window.onload=function(){
|
|
1444
1438
|
|
1445
1439
|
|
1446
1440
|
|
1441
|
+
|
1447
1442
|
|
1448
1443
|
|
1449
1444
|
<div class="method-source-code" id="print_title_bar-source">
|
1450
1445
|
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/call_stack_printer.rb, line 731</span>
|
1451
1446
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_title_bar</span>
|
1452
|
-
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-
|
1447
|
+
<span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value"><<-"end_title_bar"
|
1448
|
+
<div id="titlebar">
|
1453
1449
|
Call tree for application <b>#{h application} #{h arguments}</b><br/>
|
1454
1450
|
Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
1455
1451
|
</div>
|
1456
|
-
|
1452
|
+
end_title_bar</span>
|
1457
1453
|
<span class="ruby-keyword">end</span></pre>
|
1458
|
-
</div
|
1454
|
+
</div>
|
1459
1455
|
|
1460
1456
|
</div>
|
1461
1457
|
|
1462
1458
|
|
1463
1459
|
|
1464
1460
|
|
1465
|
-
</div
|
1461
|
+
</div>
|
1466
1462
|
|
1467
1463
|
|
1468
1464
|
<div id="method-i-sum" class="method-detail ">
|
@@ -1470,7 +1466,9 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1470
1466
|
<div class="method-heading">
|
1471
1467
|
<span class="method-name">sum</span><span
|
1472
1468
|
class="method-args">(a)</span>
|
1469
|
+
|
1473
1470
|
<span class="method-click-advice">click to toggle source</span>
|
1471
|
+
|
1474
1472
|
</div>
|
1475
1473
|
|
1476
1474
|
|
@@ -1478,6 +1476,7 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1478
1476
|
|
1479
1477
|
|
1480
1478
|
|
1479
|
+
|
1481
1480
|
|
1482
1481
|
|
1483
1482
|
<div class="method-source-code" id="sum-source">
|
@@ -1485,14 +1484,14 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1485
1484
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">sum</span>(<span class="ruby-identifier">a</span>)
|
1486
1485
|
<span class="ruby-identifier">a</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0.0</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">s</span>,<span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span><span class="ruby-operator">+=</span><span class="ruby-identifier">t</span>}
|
1487
1486
|
<span class="ruby-keyword">end</span></pre>
|
1488
|
-
</div
|
1487
|
+
</div>
|
1489
1488
|
|
1490
1489
|
</div>
|
1491
1490
|
|
1492
1491
|
|
1493
1492
|
|
1494
1493
|
|
1495
|
-
</div
|
1494
|
+
</div>
|
1496
1495
|
|
1497
1496
|
|
1498
1497
|
<div id="method-i-threshold" class="method-detail ">
|
@@ -1500,7 +1499,9 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1500
1499
|
<div class="method-heading">
|
1501
1500
|
<span class="method-name">threshold</span><span
|
1502
1501
|
class="method-args">()</span>
|
1502
|
+
|
1503
1503
|
<span class="method-click-advice">click to toggle source</span>
|
1504
|
+
|
1504
1505
|
</div>
|
1505
1506
|
|
1506
1507
|
|
@@ -1508,6 +1509,7 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1508
1509
|
|
1509
1510
|
|
1510
1511
|
|
1512
|
+
|
1511
1513
|
|
1512
1514
|
|
1513
1515
|
<div class="method-source-code" id="threshold-source">
|
@@ -1515,14 +1517,14 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1515
1517
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">threshold</span>
|
1516
1518
|
<span class="ruby-ivar">@options</span>[<span class="ruby-value">:threshold</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1.0</span>
|
1517
1519
|
<span class="ruby-keyword">end</span></pre>
|
1518
|
-
</div
|
1520
|
+
</div>
|
1519
1521
|
|
1520
1522
|
</div>
|
1521
1523
|
|
1522
1524
|
|
1523
1525
|
|
1524
1526
|
|
1525
|
-
</div
|
1527
|
+
</div>
|
1526
1528
|
|
1527
1529
|
|
1528
1530
|
<div id="method-i-title" class="method-detail ">
|
@@ -1530,7 +1532,9 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1530
1532
|
<div class="method-heading">
|
1531
1533
|
<span class="method-name">title</span><span
|
1532
1534
|
class="method-args">()</span>
|
1535
|
+
|
1533
1536
|
<span class="method-click-advice">click to toggle source</span>
|
1537
|
+
|
1534
1538
|
</div>
|
1535
1539
|
|
1536
1540
|
|
@@ -1538,6 +1542,7 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1538
1542
|
|
1539
1543
|
|
1540
1544
|
|
1545
|
+
|
1541
1546
|
|
1542
1547
|
|
1543
1548
|
<div class="method-source-code" id="title-source">
|
@@ -1545,14 +1550,14 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1545
1550
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">title</span>
|
1546
1551
|
<span class="ruby-ivar">@title</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:title</span>) <span class="ruby-operator">||</span> <span class="ruby-string">"ruby-prof call tree"</span>
|
1547
1552
|
<span class="ruby-keyword">end</span></pre>
|
1548
|
-
</div
|
1553
|
+
</div>
|
1549
1554
|
|
1550
1555
|
</div>
|
1551
1556
|
|
1552
1557
|
|
1553
1558
|
|
1554
1559
|
|
1555
|
-
</div
|
1560
|
+
</div>
|
1556
1561
|
|
1557
1562
|
|
1558
1563
|
<div id="method-i-total_time" class="method-detail ">
|
@@ -1560,7 +1565,9 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1560
1565
|
<div class="method-heading">
|
1561
1566
|
<span class="method-name">total_time</span><span
|
1562
1567
|
class="method-args">(call_infos)</span>
|
1568
|
+
|
1563
1569
|
<span class="method-click-advice">click to toggle source</span>
|
1570
|
+
|
1564
1571
|
</div>
|
1565
1572
|
|
1566
1573
|
|
@@ -1568,6 +1575,7 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1568
1575
|
|
1569
1576
|
|
1570
1577
|
|
1578
|
+
|
1571
1579
|
|
1572
1580
|
|
1573
1581
|
<div class="method-source-code" id="total_time-source">
|
@@ -1575,26 +1583,25 @@ Generated on #{Time.now} with options #{h @options.inspect}<br/>
|
|
1575
1583
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">total_time</span>(<span class="ruby-identifier">call_infos</span>)
|
1576
1584
|
<span class="ruby-identifier">sum</span>(<span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">ci</span><span class="ruby-operator">|</span> <span class="ruby-identifier">ci</span>.<span class="ruby-identifier">total_time</span>})
|
1577
1585
|
<span class="ruby-keyword">end</span></pre>
|
1578
|
-
</div
|
1586
|
+
</div>
|
1579
1587
|
|
1580
1588
|
</div>
|
1581
1589
|
|
1582
1590
|
|
1583
1591
|
|
1584
1592
|
|
1585
|
-
</div
|
1593
|
+
</div>
|
1586
1594
|
|
1587
1595
|
|
1588
|
-
</section
|
1596
|
+
</section>
|
1589
1597
|
|
1590
|
-
</section
|
1591
|
-
|
1592
|
-
</div><!-- documentation -->
|
1598
|
+
</section>
|
1599
|
+
</main>
|
1593
1600
|
|
1594
1601
|
|
1595
|
-
<footer id="validator-badges">
|
1596
|
-
<p><a href="http://validator.w3.org/check/referer">
|
1597
|
-
<p>Generated by <a href="
|
1598
|
-
<p>
|
1602
|
+
<footer id="validator-badges" role="contentinfo">
|
1603
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
1604
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
|
1605
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
1599
1606
|
</footer>
|
1600
1607
|
|