ruby-prof 0.16.2 → 0.17.0
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 +4 -4
- data/CHANGES +15 -0
- data/README.rdoc +36 -5
- data/bin/ruby-prof +7 -2
- data/doc/LICENSE.html +2 -1
- data/doc/README_rdoc.html +42 -8
- data/doc/Rack.html +2 -1
- data/doc/Rack/RubyProf.html +25 -18
- data/doc/Rack/RubyProf/RackProfiler.html +343 -0
- data/doc/RubyProf.html +14 -2
- data/doc/RubyProf/AbstractPrinter.html +91 -12
- data/doc/RubyProf/AggregateCallInfo.html +2 -1
- data/doc/RubyProf/CallInfo.html +18 -78
- data/doc/RubyProf/CallInfoPrinter.html +2 -1
- data/doc/RubyProf/CallInfoVisitor.html +2 -1
- data/doc/RubyProf/CallStackPrinter.html +35 -29
- data/doc/RubyProf/CallTreePrinter.html +98 -14
- data/doc/RubyProf/Cmd.html +11 -5
- data/doc/RubyProf/DeprecationWarnings.html +148 -0
- data/doc/RubyProf/DotPrinter.html +2 -1
- data/doc/RubyProf/FlatPrinter.html +2 -1
- data/doc/RubyProf/FlatPrinterWithLineNumbers.html +7 -5
- data/doc/RubyProf/GraphHtmlPrinter.html +18 -12
- data/doc/RubyProf/GraphPrinter.html +2 -1
- data/doc/RubyProf/MethodInfo.html +19 -88
- data/doc/RubyProf/MultiPrinter.html +231 -17
- data/doc/RubyProf/Profile.html +184 -39
- data/doc/RubyProf/Profile/ExcludeCommonMethods.html +411 -0
- data/doc/RubyProf/Profile/LegacyMethodElimination.html +158 -0
- data/doc/RubyProf/ProfileTask.html +2 -1
- data/doc/RubyProf/Thread.html +4 -39
- data/doc/created.rid +21 -19
- data/doc/css/fonts.css +6 -6
- data/doc/examples/flat_txt.html +2 -1
- data/doc/examples/graph_html.html +2 -1
- data/doc/examples/graph_txt.html +2 -1
- data/doc/index.html +47 -7
- data/doc/js/darkfish.js +7 -7
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +1 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +190 -80
- data/ext/ruby_prof/extconf.rb +4 -0
- data/ext/ruby_prof/rp_call_info.c +19 -1
- data/ext/ruby_prof/rp_call_info.h +8 -3
- data/ext/ruby_prof/rp_method.c +282 -57
- data/ext/ruby_prof/rp_method.h +28 -5
- data/ext/ruby_prof/rp_stack.c +69 -24
- data/ext/ruby_prof/rp_stack.h +21 -9
- data/ext/ruby_prof/rp_thread.c +4 -1
- data/ext/ruby_prof/ruby_prof.c +142 -39
- data/ext/ruby_prof/ruby_prof.h +3 -0
- data/lib/ruby-prof.rb +10 -0
- data/lib/ruby-prof/call_info.rb +0 -11
- data/lib/ruby-prof/method_info.rb +4 -12
- data/lib/ruby-prof/printers/abstract_printer.rb +19 -1
- data/lib/ruby-prof/printers/call_info_printer.rb +1 -1
- data/lib/ruby-prof/printers/call_stack_printer.rb +9 -4
- data/lib/ruby-prof/printers/call_tree_printer.rb +15 -2
- data/lib/ruby-prof/printers/flat_printer_with_line_numbers.rb +23 -4
- data/lib/ruby-prof/printers/graph_html_printer.rb +10 -5
- data/lib/ruby-prof/printers/graph_printer.rb +2 -2
- data/lib/ruby-prof/printers/multi_printer.rb +44 -18
- data/lib/ruby-prof/profile.rb +13 -42
- data/lib/ruby-prof/profile/exclude_common_methods.rb +201 -0
- data/lib/ruby-prof/profile/legacy_method_elimination.rb +49 -0
- data/lib/ruby-prof/rack.rb +130 -51
- data/lib/ruby-prof/thread.rb +0 -6
- data/lib/ruby-prof/version.rb +1 -1
- data/ruby-prof.gemspec +4 -3
- data/test/aggregate_test.rb +1 -1
- data/test/exclude_methods_test.rb +146 -0
- data/test/line_number_test.rb +12 -3
- data/test/multi_printer_test.rb +23 -2
- data/test/no_method_class_test.rb +1 -1
- data/test/printers_test.rb +21 -1
- data/test/rack_test.rb +64 -0
- data/test/recursive_test.rb +15 -15
- data/test/test_helper.rb +11 -0
- metadata +20 -13
data/doc/RubyProf/Cmd.html
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -203,7 +204,7 @@
|
|
203
204
|
|
204
205
|
|
205
206
|
<div class="method-source-code" id="load_pre_execs-source">
|
206
|
-
<pre><span class="ruby-comment"># File bin/ruby-prof, line
|
207
|
+
<pre><span class="ruby-comment"># File bin/ruby-prof, line 274</span>
|
207
208
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">load_pre_execs</span>
|
208
209
|
<span class="ruby-identifier">options</span>.<span class="ruby-identifier">pre_execs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">exec</span><span class="ruby-operator">|</span>
|
209
210
|
<span class="ruby-identifier">eval</span>(<span class="ruby-identifier">exec</span>)
|
@@ -238,7 +239,7 @@
|
|
238
239
|
|
239
240
|
|
240
241
|
<div class="method-source-code" id="load_pre_libs-source">
|
241
|
-
<pre><span class="ruby-comment"># File bin/ruby-prof, line
|
242
|
+
<pre><span class="ruby-comment"># File bin/ruby-prof, line 268</span>
|
242
243
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">load_pre_libs</span>
|
243
244
|
<span class="ruby-identifier">options</span>.<span class="ruby-identifier">pre_libs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">lib</span><span class="ruby-operator">|</span>
|
244
245
|
<span class="ruby-identifier">require</span> <span class="ruby-identifier">lib</span>
|
@@ -508,9 +509,14 @@
|
|
508
509
|
|
509
510
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">option_parser</span>.<span class="ruby-identifier">parse!</span> <span class="ruby-constant">ARGV</span>
|
510
511
|
|
511
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">printer</span
|
512
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">printer</span>.<span class="ruby-identifier">needs_dir?</span>
|
512
513
|
<span class="ruby-identifier">options</span>.<span class="ruby-identifier">file</span> <span class="ruby-operator">||=</span> <span class="ruby-string">"."</span>
|
513
514
|
<span class="ruby-identifier">options</span>.<span class="ruby-identifier">old_wd</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">pwd</span>
|
515
|
+
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">options</span>.<span class="ruby-identifier">file</span>)
|
516
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"'#{options.file}' is not a directory"</span>
|
517
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{options.printer} needs an existing directory path to put profiles under."</span>
|
518
|
+
<span class="ruby-identifier">exit</span>(<span class="ruby-value">-1</span>)
|
519
|
+
<span class="ruby-keyword">end</span>
|
514
520
|
<span class="ruby-keyword">end</span>
|
515
521
|
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">OptionParser</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidOption</span>, <span class="ruby-constant">OptionParser</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidArgument</span>, <span class="ruby-constant">OptionParser</span><span class="ruby-operator">::</span><span class="ruby-constant">MissingArgument</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
516
522
|
<span class="ruby-identifier">puts</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">option_parser</span>
|
@@ -546,7 +552,7 @@
|
|
546
552
|
|
547
553
|
|
548
554
|
<div class="method-source-code" id="run-source">
|
549
|
-
<pre><span class="ruby-comment"># File bin/ruby-prof, line
|
555
|
+
<pre><span class="ruby-comment"># File bin/ruby-prof, line 280</span>
|
550
556
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">run</span>
|
551
557
|
<span class="ruby-comment"># Get the script we will execute</span>
|
552
558
|
<span class="ruby-identifier">script</span> = <span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">shift</span>
|
@@ -625,7 +631,7 @@
|
|
625
631
|
|
626
632
|
<footer id="validator-badges" role="contentinfo">
|
627
633
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
628
|
-
<p>Generated by <a href="
|
634
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
629
635
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
630
636
|
</footer>
|
631
637
|
|
@@ -0,0 +1,148 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module RubyProf::DeprecationWarnings - ruby-prof</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/jquery.js"></script>
|
15
|
+
<script src="../js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="module">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="../index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="class-metadata">
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
<!-- Method Quickref -->
|
62
|
+
<div id="method-list-section" class="nav-section">
|
63
|
+
<h3>Methods</h3>
|
64
|
+
|
65
|
+
<ul class="link-list" role="directory">
|
66
|
+
|
67
|
+
<li ><a href="#method-i-deprecation_warning">#deprecation_warning</a>
|
68
|
+
|
69
|
+
</ul>
|
70
|
+
</div>
|
71
|
+
|
72
|
+
</div>
|
73
|
+
</nav>
|
74
|
+
|
75
|
+
<main role="main" aria-labelledby="module-RubyProf::DeprecationWarnings">
|
76
|
+
<h1 id="module-RubyProf::DeprecationWarnings" class="module">
|
77
|
+
module RubyProf::DeprecationWarnings
|
78
|
+
</h1>
|
79
|
+
|
80
|
+
<section class="description">
|
81
|
+
|
82
|
+
</section>
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
98
|
+
<header>
|
99
|
+
<h3>Public Instance Methods</h3>
|
100
|
+
</header>
|
101
|
+
|
102
|
+
|
103
|
+
<div id="method-i-deprecation_warning" class="method-detail ">
|
104
|
+
|
105
|
+
<div class="method-heading">
|
106
|
+
<span class="method-name">deprecation_warning</span><span
|
107
|
+
class="method-args">(feature, recommendation = nil)</span>
|
108
|
+
|
109
|
+
<span class="method-click-advice">click to toggle source</span>
|
110
|
+
|
111
|
+
</div>
|
112
|
+
|
113
|
+
|
114
|
+
<div class="method-description">
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<div class="method-source-code" id="deprecation_warning-source">
|
122
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof.rb, line 12</span>
|
123
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">deprecation_warning</span>(<span class="ruby-identifier">feature</span>, <span class="ruby-identifier">recommendation</span> = <span class="ruby-keyword">nil</span>)
|
124
|
+
<span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"DEPRECATION WARNING: #{feature}"</span>
|
125
|
+
<span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">recommendation</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">recommendation</span>.<span class="ruby-identifier">nil?</span>
|
126
|
+
<span class="ruby-keyword">end</span></pre>
|
127
|
+
</div>
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
</div>
|
135
|
+
|
136
|
+
|
137
|
+
</section>
|
138
|
+
|
139
|
+
</section>
|
140
|
+
</main>
|
141
|
+
|
142
|
+
|
143
|
+
<footer id="validator-badges" role="contentinfo">
|
144
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
145
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
146
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
147
|
+
</footer>
|
148
|
+
|
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -251,7 +252,7 @@ to use the :min_percent option, for example:</p>
|
|
251
252
|
|
252
253
|
<footer id="validator-badges" role="contentinfo">
|
253
254
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
254
|
-
<p>Generated by <a href="
|
255
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
255
256
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
256
257
|
</footer>
|
257
258
|
|
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -157,7 +158,7 @@ printer.print(STDOUT, {})</pre>
|
|
157
158
|
|
158
159
|
<footer id="validator-badges" role="contentinfo">
|
159
160
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
160
|
-
<p>Generated by <a href="
|
161
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
161
162
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
162
163
|
</footer>
|
163
164
|
|
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -137,6 +138,7 @@ printer.print(STDOUT, {})</pre>
|
|
137
138
|
<div class="method-source-code" id="print_methods-source">
|
138
139
|
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/flat_printer_with_line_numbers.rb, line 14</span>
|
139
140
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_methods</span>(<span class="ruby-identifier">thread</span>)
|
141
|
+
<span class="ruby-ivar">@editor</span> = <span class="ruby-identifier">editor_uri</span>
|
140
142
|
<span class="ruby-identifier">total_time</span> = <span class="ruby-identifier">thread</span>.<span class="ruby-identifier">total_time</span>
|
141
143
|
|
142
144
|
<span class="ruby-identifier">methods</span> = <span class="ruby-identifier">thread</span>.<span class="ruby-identifier">methods</span>.<span class="ruby-identifier">sort_by</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">sort_method</span>).<span class="ruby-identifier">reverse</span>
|
@@ -162,8 +164,8 @@ printer.print(STDOUT, {})</pre>
|
|
162
164
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">method</span>.<span class="ruby-identifier">source_file</span> <span class="ruby-operator">==</span> <span class="ruby-string">'ruby_runtime'</span>
|
163
165
|
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"\n"</span>
|
164
166
|
<span class="ruby-keyword">else</span>
|
165
|
-
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"\n
|
166
|
-
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-
|
167
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"\n defined at:\n"</span>
|
168
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">defined_at_format</span> <span class="ruby-operator">%</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>), <span class="ruby-identifier">method</span>.<span class="ruby-identifier">line</span>]
|
167
169
|
<span class="ruby-keyword">end</span>
|
168
170
|
|
169
171
|
<span class="ruby-identifier">callers</span> = []
|
@@ -176,9 +178,9 @@ printer.print(STDOUT, {})</pre>
|
|
176
178
|
<span class="ruby-identifier">callers</span>.<span class="ruby-identifier">uniq!</span>
|
177
179
|
|
178
180
|
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">callers</span>.<span class="ruby-identifier">empty?</span>
|
179
|
-
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"
|
181
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">" called from:\n"</span>
|
180
182
|
<span class="ruby-identifier">callers</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
181
|
-
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-
|
183
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">called_from_format</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">args</span>
|
182
184
|
<span class="ruby-keyword">end</span>
|
183
185
|
<span class="ruby-keyword">end</span>
|
184
186
|
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"\n"</span>
|
@@ -202,7 +204,7 @@ printer.print(STDOUT, {})</pre>
|
|
202
204
|
|
203
205
|
<footer id="validator-badges" role="contentinfo">
|
204
206
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
205
|
-
<p>Generated by <a href="
|
207
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
206
208
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
207
209
|
</footer>
|
208
210
|
|
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -122,7 +123,11 @@ printer.print(STDOUT, :min_percent=>0)</pre>
|
|
122
123
|
template to use, instead of the built-in self.template
|
123
124
|
|
124
125
|
:template - specify an ERB template to use, instead of the
|
125
|
-
built-in self.template
|
126
|
+
built-in self.template
|
127
|
+
|
128
|
+
:editor_uri - Specifies editor uri scheme used for opening files
|
129
|
+
e.g. :atm or :mvim. For OS X default is :txmt.
|
130
|
+
Use RUBY_PROF_EDITOR_URI environment variable to overide.</pre>
|
126
131
|
|
127
132
|
</section>
|
128
133
|
|
@@ -166,7 +171,7 @@ be printed out.</p>
|
|
166
171
|
|
167
172
|
|
168
173
|
<div class="method-source-code" id="create_link-source">
|
169
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line
|
174
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 49</span>
|
170
175
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">create_link</span>(<span class="ruby-identifier">thread</span>, <span class="ruby-identifier">overall_time</span>, <span class="ruby-identifier">method</span>)
|
171
176
|
<span class="ruby-identifier">total_percent</span> = (<span class="ruby-identifier">method</span>.<span class="ruby-identifier">total_time</span><span class="ruby-operator">/</span><span class="ruby-identifier">overall_time</span>) <span class="ruby-operator">*</span> <span class="ruby-value">100</span>
|
172
177
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">total_percent</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">min_percent</span>
|
@@ -206,14 +211,14 @@ be printed out.</p>
|
|
206
211
|
|
207
212
|
|
208
213
|
<div class="method-source-code" id="file_link-source">
|
209
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line
|
214
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 64</span>
|
210
215
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">file_link</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">linenum</span>)
|
211
216
|
<span class="ruby-identifier">srcfile</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">path</span>)
|
212
217
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">srcfile</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/\/ruby_runtime$/</span>
|
213
218
|
<span class="ruby-string">""</span>
|
214
219
|
<span class="ruby-keyword">else</span>
|
215
|
-
<span class="ruby-keyword">if</span> <span class="ruby-
|
216
|
-
<span class="ruby-node">"<a href=\"
|
220
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@editor</span>
|
221
|
+
<span class="ruby-node">"<a href=\"#{@editor}://"</span> <span class="ruby-node">"open?url=file://#{h srcfile}&line=#{linenum}\""</span> <span class="ruby-node">"title=\"#{h srcfile}:#{linenum}\">#{linenum}</a>"</span>
|
217
222
|
<span class="ruby-keyword">else</span>
|
218
223
|
<span class="ruby-node">"<a href=\"file://#{h srcfile}##{linenum}\" title=\"#{h srcfile}:#{linenum}\">#{linenum}</a>"</span>
|
219
224
|
<span class="ruby-keyword">end</span>
|
@@ -248,7 +253,7 @@ be printed out.</p>
|
|
248
253
|
|
249
254
|
|
250
255
|
<div class="method-source-code" id="method_href-source">
|
251
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line
|
256
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 60</span>
|
252
257
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">method_href</span>(<span class="ruby-identifier">thread</span>, <span class="ruby-identifier">method</span>)
|
253
258
|
<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-identifier">thread</span>.<span class="ruby-identifier">fiber_id</span>.<span class="ruby-identifier">to_s</span>)
|
254
259
|
<span class="ruby-keyword">end</span></pre>
|
@@ -281,10 +286,11 @@ be printed out.</p>
|
|
281
286
|
|
282
287
|
|
283
288
|
<div class="method-source-code" id="print-source">
|
284
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line
|
289
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 38</span>
|
285
290
|
<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> = {})
|
286
291
|
<span class="ruby-ivar">@output</span> = <span class="ruby-identifier">output</span>
|
287
292
|
<span class="ruby-identifier">setup_options</span>(<span class="ruby-identifier">options</span>)
|
293
|
+
<span class="ruby-ivar">@editor</span> = <span class="ruby-identifier">editor_uri</span>
|
288
294
|
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@erb</span>.<span class="ruby-identifier">result</span>(<span class="ruby-identifier">binding</span>).<span class="ruby-identifier">split</span>(<span class="ruby-string">"\n"</span>).<span class="ruby-identifier">map</span>(<span class="ruby-operator">&</span><span class="ruby-value">:rstrip</span>).<span class="ruby-identifier">join</span>(<span class="ruby-string">"\n"</span>) <span class="ruby-operator"><<</span> <span class="ruby-string">"\n"</span>
|
289
295
|
<span class="ruby-keyword">end</span></pre>
|
290
296
|
</div>
|
@@ -321,7 +327,7 @@ be printed out.</p>
|
|
321
327
|
|
322
328
|
|
323
329
|
<div class="method-source-code" id="setup_options-source">
|
324
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line
|
330
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 29</span>
|
325
331
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">setup_options</span>(<span class="ruby-identifier">options</span>)
|
326
332
|
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">options</span>)
|
327
333
|
|
@@ -359,7 +365,7 @@ be printed out.</p>
|
|
359
365
|
|
360
366
|
|
361
367
|
<div class="method-source-code" id="template-source">
|
362
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line
|
368
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 79</span>
|
363
369
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">template</span>
|
364
370
|
<span class="ruby-string">'
|
365
371
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
@@ -483,8 +489,8 @@ be printed out.</p>
|
|
483
489
|
</tr>
|
484
490
|
<% end %>
|
485
491
|
<tr class="method">
|
486
|
-
<td><%= sprintf("%.2f
|
487
|
-
<td><%= sprintf("%.2f
|
492
|
+
<td><%= sprintf("%.2f%%", total_percentage) %></td>
|
493
|
+
<td><%= sprintf("%.2f%%", self_percentage) %></td>
|
488
494
|
<td><%= sprintf("%.2f", method.total_time) %></td>
|
489
495
|
<td><%= sprintf("%.2f", method.self_time) %></td>
|
490
496
|
<td><%= sprintf("%.2f", method.wait_time) %></td>
|
@@ -546,7 +552,7 @@ be printed out.</p>
|
|
546
552
|
|
547
553
|
<footer id="validator-badges" role="contentinfo">
|
548
554
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
549
|
-
<p>Generated by <a href="
|
555
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
550
556
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
551
557
|
</footer>
|
552
558
|
|
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -133,7 +134,7 @@ href="../README_rdoc.html">README</a></p>
|
|
133
134
|
|
134
135
|
<footer id="validator-badges" role="contentinfo">
|
135
136
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
136
|
-
<p>Generated by <a href="
|
137
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
137
138
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
138
139
|
</footer>
|
139
140
|
|
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
11
12
|
</script>
|
12
13
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
@@ -93,16 +94,12 @@
|
|
93
94
|
|
94
95
|
<li ><a href="#method-i-children_time">#children_time</a>
|
95
96
|
|
96
|
-
<li ><a href="#method-i-detect_recursion">#detect_recursion</a>
|
97
|
-
|
98
97
|
<li ><a href="#method-i-eliminate-21">#eliminate!</a>
|
99
98
|
|
100
99
|
<li ><a href="#method-i-min_depth">#min_depth</a>
|
101
100
|
|
102
101
|
<li ><a href="#method-i-parents">#parents</a>
|
103
102
|
|
104
|
-
<li ><a href="#method-i-recursive-3F">#recursive?</a>
|
105
|
-
|
106
103
|
<li ><a href="#method-i-root-3F">#root?</a>
|
107
104
|
|
108
105
|
<li ><a href="#method-i-self_time">#self_time</a>
|
@@ -209,7 +206,7 @@
|
|
209
206
|
|
210
207
|
|
211
208
|
<div class="method-source-code" id="aggregate_children-source">
|
212
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
209
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 96</span>
|
213
210
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">aggregate_children</span>
|
214
211
|
<span class="ruby-comment"># group call infos based on their targets</span>
|
215
212
|
<span class="ruby-identifier">groups</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each_with_object</span>({}) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span>, <span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
|
@@ -250,7 +247,7 @@
|
|
250
247
|
|
251
248
|
|
252
249
|
<div class="method-source-code" id="aggregate_parents-source">
|
253
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
250
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 84</span>
|
254
251
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">aggregate_parents</span>
|
255
252
|
<span class="ruby-comment"># group call infos based on their parents</span>
|
256
253
|
<span class="ruby-identifier">groups</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">each_with_object</span>({}) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span>, <span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
|
@@ -291,7 +288,7 @@
|
|
291
288
|
|
292
289
|
|
293
290
|
<div class="method-source-code" id="called-source">
|
294
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
291
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 20</span>
|
295
292
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">called</span>
|
296
293
|
<span class="ruby-ivar">@called</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
|
297
294
|
<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>
|
@@ -328,7 +325,7 @@
|
|
328
325
|
|
329
326
|
|
330
327
|
<div class="method-source-code" id="children-source">
|
331
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
328
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 76</span>
|
332
329
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">children</span>
|
333
330
|
<span class="ruby-ivar">@children</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&</span><span class="ruby-value">:children</span>).<span class="ruby-identifier">flatten</span>
|
334
331
|
<span class="ruby-keyword">end</span></pre>
|
@@ -361,11 +358,11 @@
|
|
361
358
|
|
362
359
|
|
363
360
|
<div class="method-source-code" id="children_time-source">
|
364
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
361
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 55</span>
|
365
362
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">children_time</span>
|
366
363
|
<span class="ruby-ivar">@children_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
|
367
364
|
<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>
|
368
|
-
<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">
|
365
|
+
<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">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive?</span>
|
369
366
|
<span class="ruby-identifier">sum</span>
|
370
367
|
<span class="ruby-keyword">end</span>
|
371
368
|
<span class="ruby-keyword">end</span>
|
@@ -377,39 +374,6 @@
|
|
377
374
|
|
378
375
|
|
379
376
|
|
380
|
-
</div>
|
381
|
-
|
382
|
-
|
383
|
-
<div id="method-i-detect_recursion" class="method-detail ">
|
384
|
-
|
385
|
-
<div class="method-heading">
|
386
|
-
<span class="method-name">detect_recursion</span><span
|
387
|
-
class="method-args">()</span>
|
388
|
-
|
389
|
-
<span class="method-click-advice">click to toggle source</span>
|
390
|
-
|
391
|
-
</div>
|
392
|
-
|
393
|
-
|
394
|
-
<div class="method-description">
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
<div class="method-source-code" id="detect_recursion-source">
|
402
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 20</span>
|
403
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">detect_recursion</span>
|
404
|
-
<span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">each</span>(<span class="ruby-operator">&</span><span class="ruby-value">:detect_recursion</span>)
|
405
|
-
<span class="ruby-keyword">end</span></pre>
|
406
|
-
</div>
|
407
|
-
|
408
|
-
</div>
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
377
|
</div>
|
414
378
|
|
415
379
|
|
@@ -432,7 +396,7 @@
|
|
432
396
|
|
433
397
|
|
434
398
|
<div class="method-source-code" id="eliminate-21-source">
|
435
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
399
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 113</span>
|
436
400
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">eliminate!</span>
|
437
401
|
<span class="ruby-comment"># $stderr.puts "eliminating #{self}"</span>
|
438
402
|
<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> }
|
@@ -467,7 +431,7 @@
|
|
467
431
|
|
468
432
|
|
469
433
|
<div class="method-source-code" id="min_depth-source">
|
470
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
434
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 64</span>
|
471
435
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">min_depth</span>
|
472
436
|
<span class="ruby-ivar">@min_depth</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&</span><span class="ruby-value">:depth</span>).<span class="ruby-identifier">min</span>
|
473
437
|
<span class="ruby-keyword">end</span></pre>
|
@@ -500,7 +464,7 @@
|
|
500
464
|
|
501
465
|
|
502
466
|
<div class="method-source-code" id="parents-source">
|
503
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
467
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 80</span>
|
504
468
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">parents</span>
|
505
469
|
<span class="ruby-ivar">@parents</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&</span><span class="ruby-value">:parent</span>)
|
506
470
|
<span class="ruby-keyword">end</span></pre>
|
@@ -511,39 +475,6 @@
|
|
511
475
|
|
512
476
|
|
513
477
|
|
514
|
-
</div>
|
515
|
-
|
516
|
-
|
517
|
-
<div id="method-i-recursive-3F" class="method-detail ">
|
518
|
-
|
519
|
-
<div class="method-heading">
|
520
|
-
<span class="method-name">recursive?</span><span
|
521
|
-
class="method-args">()</span>
|
522
|
-
|
523
|
-
<span class="method-click-advice">click to toggle source</span>
|
524
|
-
|
525
|
-
</div>
|
526
|
-
|
527
|
-
|
528
|
-
<div class="method-description">
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
<div class="method-source-code" id="recursive-3F-source">
|
536
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 80</span>
|
537
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">recursive?</span>
|
538
|
-
(<span class="ruby-ivar">@recursive</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">detect</span>(<span class="ruby-operator">&</span><span class="ruby-value">:recursive</span>) <span class="ruby-operator">?</span> <span class="ruby-value">:true</span> <span class="ruby-operator">:</span> <span class="ruby-value">:false</span>) <span class="ruby-operator">==</span> <span class="ruby-value">:true</span>
|
539
|
-
<span class="ruby-keyword">end</span></pre>
|
540
|
-
</div>
|
541
|
-
|
542
|
-
</div>
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
478
|
</div>
|
548
479
|
|
549
480
|
|
@@ -566,7 +497,7 @@
|
|
566
497
|
|
567
498
|
|
568
499
|
<div class="method-source-code" id="root-3F-source">
|
569
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
500
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 68</span>
|
570
501
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">root?</span>
|
571
502
|
<span class="ruby-ivar">@root</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
|
572
503
|
<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>
|
@@ -603,11 +534,11 @@
|
|
603
534
|
|
604
535
|
|
605
536
|
<div class="method-source-code" id="self_time-source">
|
606
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
537
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 37</span>
|
607
538
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">self_time</span>
|
608
539
|
<span class="ruby-ivar">@self_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
|
609
540
|
<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>
|
610
|
-
<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">
|
541
|
+
<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">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive?</span>
|
611
542
|
<span class="ruby-identifier">sum</span>
|
612
543
|
<span class="ruby-keyword">end</span>
|
613
544
|
<span class="ruby-keyword">end</span>
|
@@ -641,7 +572,7 @@
|
|
641
572
|
|
642
573
|
|
643
574
|
<div class="method-source-code" id="to_s-source">
|
644
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
575
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 108</span>
|
645
576
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
646
577
|
<span class="ruby-node">"#{self.full_name} (c: #{self.called}, tt: #{self.total_time}, st: #{self.self_time}, wt: #{wait_time}, ct: #{self.children_time})"</span>
|
647
578
|
<span class="ruby-keyword">end</span></pre>
|
@@ -674,11 +605,11 @@
|
|
674
605
|
|
675
606
|
|
676
607
|
<div class="method-source-code" id="total_time-source">
|
677
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
608
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 28</span>
|
678
609
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">total_time</span>
|
679
610
|
<span class="ruby-ivar">@total_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
|
680
611
|
<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>
|
681
|
-
<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">
|
612
|
+
<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">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive?</span>
|
682
613
|
<span class="ruby-identifier">sum</span>
|
683
614
|
<span class="ruby-keyword">end</span>
|
684
615
|
<span class="ruby-keyword">end</span>
|
@@ -712,11 +643,11 @@
|
|
712
643
|
|
713
644
|
|
714
645
|
<div class="method-source-code" id="wait_time-source">
|
715
|
-
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line
|
646
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 46</span>
|
716
647
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">wait_time</span>
|
717
648
|
<span class="ruby-ivar">@wait_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
|
718
649
|
<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>
|
719
|
-
<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">
|
650
|
+
<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">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive?</span>
|
720
651
|
<span class="ruby-identifier">sum</span>
|
721
652
|
<span class="ruby-keyword">end</span>
|
722
653
|
<span class="ruby-keyword">end</span>
|
@@ -739,7 +670,7 @@
|
|
739
670
|
|
740
671
|
<footer id="validator-badges" role="contentinfo">
|
741
672
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
742
|
-
<p>Generated by <a href="
|
673
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
743
674
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
744
675
|
</footer>
|
745
676
|
|