ruby-prof 0.16.2 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,411 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class RubyProf::Profile::ExcludeCommonMethods - 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="class">
|
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
|
+
<div id="parent-class-section" class="nav-section">
|
59
|
+
<h3>Parent</h3>
|
60
|
+
|
61
|
+
|
62
|
+
<p class="link">Object
|
63
|
+
|
64
|
+
</div>
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
<!-- Method Quickref -->
|
69
|
+
<div id="method-list-section" class="nav-section">
|
70
|
+
<h3>Methods</h3>
|
71
|
+
|
72
|
+
<ul class="link-list" role="directory">
|
73
|
+
|
74
|
+
<li ><a href="#method-c-apply-21">::apply!</a>
|
75
|
+
|
76
|
+
<li ><a href="#method-c-new">::new</a>
|
77
|
+
|
78
|
+
<li ><a href="#method-i-apply-21">#apply!</a>
|
79
|
+
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
</nav>
|
85
|
+
|
86
|
+
<main role="main" aria-labelledby="class-RubyProf::Profile::ExcludeCommonMethods">
|
87
|
+
<h1 id="class-RubyProf::Profile::ExcludeCommonMethods" class="class">
|
88
|
+
class RubyProf::Profile::ExcludeCommonMethods
|
89
|
+
</h1>
|
90
|
+
|
91
|
+
<section class="description">
|
92
|
+
|
93
|
+
</section>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<section class="constants-list">
|
105
|
+
<header>
|
106
|
+
<h3>Constants</h3>
|
107
|
+
</header>
|
108
|
+
<dl>
|
109
|
+
|
110
|
+
<dt id="ENUMERABLE_NAMES">ENUMERABLE_NAMES
|
111
|
+
|
112
|
+
<dd>
|
113
|
+
|
114
|
+
|
115
|
+
</dl>
|
116
|
+
</section>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
123
|
+
<header>
|
124
|
+
<h3>Public Class Methods</h3>
|
125
|
+
</header>
|
126
|
+
|
127
|
+
|
128
|
+
<div id="method-c-apply-21" class="method-detail ">
|
129
|
+
|
130
|
+
<div class="method-heading">
|
131
|
+
<span class="method-name">apply!</span><span
|
132
|
+
class="method-args">(profile)</span>
|
133
|
+
|
134
|
+
<span class="method-click-advice">click to toggle source</span>
|
135
|
+
|
136
|
+
</div>
|
137
|
+
|
138
|
+
|
139
|
+
<div class="method-description">
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<div class="method-source-code" id="apply-21-source">
|
147
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/profile/exclude_common_methods.rb, line 8</span>
|
148
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">apply!</span>(<span class="ruby-identifier">profile</span>)
|
149
|
+
<span class="ruby-identifier">new</span>(<span class="ruby-identifier">profile</span>).<span class="ruby-identifier">apply!</span>
|
150
|
+
<span class="ruby-keyword">end</span></pre>
|
151
|
+
</div>
|
152
|
+
|
153
|
+
</div>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
</div>
|
159
|
+
|
160
|
+
|
161
|
+
<div id="method-c-new" class="method-detail ">
|
162
|
+
|
163
|
+
<div class="method-heading">
|
164
|
+
<span class="method-name">new</span><span
|
165
|
+
class="method-args">(profile)</span>
|
166
|
+
|
167
|
+
<span class="method-click-advice">click to toggle source</span>
|
168
|
+
|
169
|
+
</div>
|
170
|
+
|
171
|
+
|
172
|
+
<div class="method-description">
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<div class="method-source-code" id="new-source">
|
180
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/profile/exclude_common_methods.rb, line 12</span>
|
181
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">profile</span>)
|
182
|
+
<span class="ruby-ivar">@profile</span> = <span class="ruby-identifier">profile</span>
|
183
|
+
<span class="ruby-keyword">end</span></pre>
|
184
|
+
</div>
|
185
|
+
|
186
|
+
</div>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</div>
|
192
|
+
|
193
|
+
|
194
|
+
</section>
|
195
|
+
|
196
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
197
|
+
<header>
|
198
|
+
<h3>Public Instance Methods</h3>
|
199
|
+
</header>
|
200
|
+
|
201
|
+
|
202
|
+
<div id="method-i-apply-21" class="method-detail ">
|
203
|
+
|
204
|
+
<div class="method-heading">
|
205
|
+
<span class="method-name">apply!</span><span
|
206
|
+
class="method-args">()</span>
|
207
|
+
|
208
|
+
<span class="method-click-advice">click to toggle source</span>
|
209
|
+
|
210
|
+
</div>
|
211
|
+
|
212
|
+
|
213
|
+
<div class="method-description">
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
<div class="method-source-code" id="apply-21-source">
|
221
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/profile/exclude_common_methods.rb, line 16</span>
|
222
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">apply!</span>
|
223
|
+
<span class="ruby-comment">##</span>
|
224
|
+
<span class="ruby-comment"># Kernel Methods</span>
|
225
|
+
<span class="ruby-comment">##</span>
|
226
|
+
|
227
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">Kernel</span>, [
|
228
|
+
<span class="ruby-value">:dup</span>,
|
229
|
+
<span class="ruby-value">:initialize_dup</span>,
|
230
|
+
<span class="ruby-value">:tap</span>,
|
231
|
+
<span class="ruby-value">:send</span>,
|
232
|
+
<span class="ruby-value">:public_send</span>,
|
233
|
+
]
|
234
|
+
|
235
|
+
<span class="ruby-comment">##</span>
|
236
|
+
<span class="ruby-comment"># Fundamental Types</span>
|
237
|
+
<span class="ruby-comment">##</span>
|
238
|
+
|
239
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">BasicObject</span>, <span class="ruby-value">:"!="</span>
|
240
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">Method</span>, <span class="ruby-value">:"[]"</span>
|
241
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">Module</span>, <span class="ruby-value">:new</span>
|
242
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">Class</span>, <span class="ruby-value">:new</span>
|
243
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">Proc</span>, <span class="ruby-value">:call</span>, <span class="ruby-value">:yield</span>
|
244
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">Range</span>, <span class="ruby-value">:each</span>
|
245
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">Integer</span>, <span class="ruby-value">:times</span>
|
246
|
+
|
247
|
+
<span class="ruby-comment">##</span>
|
248
|
+
<span class="ruby-comment"># Value Types</span>
|
249
|
+
<span class="ruby-comment">##</span>
|
250
|
+
|
251
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">String</span>, [
|
252
|
+
<span class="ruby-value">:sub</span>,
|
253
|
+
<span class="ruby-value">:sub!</span>,
|
254
|
+
<span class="ruby-value">:gsub</span>,
|
255
|
+
<span class="ruby-value">:gsub!</span>,
|
256
|
+
]
|
257
|
+
|
258
|
+
<span class="ruby-comment">##</span>
|
259
|
+
<span class="ruby-comment"># Emumerables</span>
|
260
|
+
<span class="ruby-comment">##</span>
|
261
|
+
|
262
|
+
<span class="ruby-identifier">exclude_enumerable</span> <span class="ruby-constant">Enumerable</span>
|
263
|
+
<span class="ruby-identifier">exclude_enumerable</span> <span class="ruby-constant">Enumerator</span>
|
264
|
+
|
265
|
+
<span class="ruby-comment">##</span>
|
266
|
+
<span class="ruby-comment"># Collections</span>
|
267
|
+
<span class="ruby-comment">##</span>
|
268
|
+
|
269
|
+
<span class="ruby-identifier">exclude_enumerable</span> <span class="ruby-constant">Array</span>, [
|
270
|
+
<span class="ruby-value">:each_index</span>,
|
271
|
+
<span class="ruby-value">:map!</span>,
|
272
|
+
<span class="ruby-value">:select!</span>,
|
273
|
+
<span class="ruby-value">:reject!</span>,
|
274
|
+
<span class="ruby-value">:collect!</span>,
|
275
|
+
<span class="ruby-value">:sort!</span>,
|
276
|
+
<span class="ruby-value">:sort_by!</span>,
|
277
|
+
<span class="ruby-value">:index</span>,
|
278
|
+
<span class="ruby-value">:delete_if</span>,
|
279
|
+
<span class="ruby-value">:keep_if</span>,
|
280
|
+
<span class="ruby-value">:drop_while</span>,
|
281
|
+
<span class="ruby-value">:uniq</span>,
|
282
|
+
<span class="ruby-value">:uniq!</span>,
|
283
|
+
<span class="ruby-value">:"=="</span>,
|
284
|
+
<span class="ruby-value">:eql?</span>,
|
285
|
+
<span class="ruby-value">:hash</span>,
|
286
|
+
<span class="ruby-value">:to_json</span>,
|
287
|
+
<span class="ruby-value">:as_json</span>,
|
288
|
+
<span class="ruby-value">:encode_json</span>,
|
289
|
+
]
|
290
|
+
|
291
|
+
<span class="ruby-identifier">exclude_enumerable</span> <span class="ruby-constant">Hash</span>, [
|
292
|
+
<span class="ruby-value">:dup</span>,
|
293
|
+
<span class="ruby-value">:initialize_dup</span>,
|
294
|
+
<span class="ruby-value">:fetch</span>,
|
295
|
+
<span class="ruby-value">:"[]"</span>,
|
296
|
+
<span class="ruby-value">:"[]="</span>,
|
297
|
+
<span class="ruby-value">:each_key</span>,
|
298
|
+
<span class="ruby-value">:each_value</span>,
|
299
|
+
<span class="ruby-value">:each_pair</span>,
|
300
|
+
<span class="ruby-value">:map!</span>,
|
301
|
+
<span class="ruby-value">:select!</span>,
|
302
|
+
<span class="ruby-value">:reject!</span>,
|
303
|
+
<span class="ruby-value">:collect!</span>,
|
304
|
+
<span class="ruby-value">:delete_if</span>,
|
305
|
+
<span class="ruby-value">:keep_if</span>,
|
306
|
+
<span class="ruby-value">:slice</span>,
|
307
|
+
<span class="ruby-value">:slice!</span>,
|
308
|
+
<span class="ruby-value">:except</span>,
|
309
|
+
<span class="ruby-value">:except!</span>,
|
310
|
+
<span class="ruby-value">:"=="</span>,
|
311
|
+
<span class="ruby-value">:eql?</span>,
|
312
|
+
<span class="ruby-value">:hash</span>,
|
313
|
+
<span class="ruby-value">:to_json</span>,
|
314
|
+
<span class="ruby-value">:as_json</span>,
|
315
|
+
<span class="ruby-value">:encode_json</span>,
|
316
|
+
]
|
317
|
+
|
318
|
+
<span class="ruby-identifier">exclude_enumerable</span> <span class="ruby-constant">Set</span>, [
|
319
|
+
<span class="ruby-value">:map!</span>,
|
320
|
+
<span class="ruby-value">:select!</span>,
|
321
|
+
<span class="ruby-value">:reject!</span>,
|
322
|
+
<span class="ruby-value">:collect!</span>,
|
323
|
+
<span class="ruby-value">:classify</span>,
|
324
|
+
<span class="ruby-value">:delete_if</span>,
|
325
|
+
<span class="ruby-value">:keep_if</span>,
|
326
|
+
<span class="ruby-value">:divide</span>,
|
327
|
+
<span class="ruby-value">:"=="</span>,
|
328
|
+
<span class="ruby-value">:eql?</span>,
|
329
|
+
<span class="ruby-value">:hash</span>,
|
330
|
+
<span class="ruby-value">:to_json</span>,
|
331
|
+
<span class="ruby-value">:as_json</span>,
|
332
|
+
<span class="ruby-value">:encode_json</span>,
|
333
|
+
]
|
334
|
+
|
335
|
+
<span class="ruby-comment">##</span>
|
336
|
+
<span class="ruby-comment"># Garbage Collection</span>
|
337
|
+
<span class="ruby-comment">##</span>
|
338
|
+
|
339
|
+
<span class="ruby-identifier">exclude_singleton_methods</span> <span class="ruby-constant">GC</span>, [
|
340
|
+
<span class="ruby-value">:start</span>
|
341
|
+
]
|
342
|
+
|
343
|
+
<span class="ruby-comment">##</span>
|
344
|
+
<span class="ruby-comment"># Unicorn</span>
|
345
|
+
<span class="ruby-comment">##</span>
|
346
|
+
|
347
|
+
<span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">Unicorn</span>)
|
348
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">Unicorn</span><span class="ruby-operator">::</span><span class="ruby-constant">HttpServer</span>, <span class="ruby-value">:process_client</span>
|
349
|
+
<span class="ruby-keyword">end</span>
|
350
|
+
|
351
|
+
<span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">Unicorn</span><span class="ruby-operator">::</span><span class="ruby-constant">OobGC</span>)
|
352
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">Unicorn</span><span class="ruby-operator">::</span><span class="ruby-constant">OobGC</span>, <span class="ruby-value">:process_client</span>
|
353
|
+
<span class="ruby-keyword">end</span>
|
354
|
+
|
355
|
+
<span class="ruby-comment">##</span>
|
356
|
+
<span class="ruby-comment"># New Relic</span>
|
357
|
+
<span class="ruby-comment">##</span>
|
358
|
+
|
359
|
+
<span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">NewRelic</span>)
|
360
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span><span class="ruby-operator">::</span><span class="ruby-constant">Instrumentation</span><span class="ruby-operator">::</span><span class="ruby-constant">MiddlewareTracing</span>, [
|
361
|
+
<span class="ruby-value">:call</span>
|
362
|
+
]
|
363
|
+
|
364
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span><span class="ruby-operator">::</span><span class="ruby-constant">MethodTracerHelpers</span>, [
|
365
|
+
<span class="ruby-value">:trace_execution_scoped</span>,
|
366
|
+
<span class="ruby-value">:log_errors</span>,
|
367
|
+
]
|
368
|
+
|
369
|
+
<span class="ruby-identifier">exclude_singleton_methods</span> <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span><span class="ruby-operator">::</span><span class="ruby-constant">MethodTracerHelpers</span>, [
|
370
|
+
<span class="ruby-value">:trace_execution_scoped</span>,
|
371
|
+
<span class="ruby-value">:log_errors</span>,
|
372
|
+
]
|
373
|
+
|
374
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Agent</span><span class="ruby-operator">::</span><span class="ruby-constant">MethodTracer</span>, [
|
375
|
+
<span class="ruby-value">:trace_execution_scoped</span>,
|
376
|
+
<span class="ruby-value">:trace_execution_unscoped</span>,
|
377
|
+
]
|
378
|
+
<span class="ruby-keyword">end</span>
|
379
|
+
|
380
|
+
<span class="ruby-comment">##</span>
|
381
|
+
<span class="ruby-comment"># Miscellaneous Methods</span>
|
382
|
+
<span class="ruby-comment">##</span>
|
383
|
+
|
384
|
+
<span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">Mustache</span>)
|
385
|
+
<span class="ruby-identifier">exclude_methods</span> <span class="ruby-constant">Mustache</span><span class="ruby-operator">::</span><span class="ruby-constant">Context</span>, [
|
386
|
+
<span class="ruby-value">:fetch</span>
|
387
|
+
]
|
388
|
+
<span class="ruby-keyword">end</span>
|
389
|
+
<span class="ruby-keyword">end</span></pre>
|
390
|
+
</div>
|
391
|
+
|
392
|
+
</div>
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
</div>
|
398
|
+
|
399
|
+
|
400
|
+
</section>
|
401
|
+
|
402
|
+
</section>
|
403
|
+
</main>
|
404
|
+
|
405
|
+
|
406
|
+
<footer id="validator-badges" role="contentinfo">
|
407
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
408
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
409
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
410
|
+
</footer>
|
411
|
+
|
@@ -0,0 +1,158 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module RubyProf::Profile::LegacyMethodElimination - 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-eliminate_methods-21">#eliminate_methods!</a>
|
68
|
+
|
69
|
+
</ul>
|
70
|
+
</div>
|
71
|
+
|
72
|
+
</div>
|
73
|
+
</nav>
|
74
|
+
|
75
|
+
<main role="main" aria-labelledby="module-RubyProf::Profile::LegacyMethodElimination">
|
76
|
+
<h1 id="module-RubyProf::Profile::LegacyMethodElimination" class="module">
|
77
|
+
module RubyProf::Profile::LegacyMethodElimination
|
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-eliminate_methods-21" class="method-detail ">
|
104
|
+
|
105
|
+
<div class="method-heading">
|
106
|
+
<span class="method-name">eliminate_methods!</span><span
|
107
|
+
class="method-args">(matchers)</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
|
+
<p>eliminate some calls from the graph by merging the information into
|
117
|
+
callers. matchers can be a list of strings or regular expressions or the
|
118
|
+
name of a file containing regexps.</p>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<div class="method-source-code" id="eliminate_methods-21-source">
|
124
|
+
<pre><span class="ruby-comment"># File lib/ruby-prof/profile/legacy_method_elimination.rb, line 6</span>
|
125
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">eliminate_methods!</span>(<span class="ruby-identifier">matchers</span>)
|
126
|
+
<span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">deprecation_warning</span>(
|
127
|
+
<span class="ruby-string">"Method 'eliminate_methods!' is dprecated"</span>,
|
128
|
+
<span class="ruby-string">"Please call 'exclude_methods!' before starting the profile run instead."</span>
|
129
|
+
)
|
130
|
+
<span class="ruby-identifier">matchers</span> = <span class="ruby-identifier">read_regexps_from_file</span>(<span class="ruby-identifier">matchers</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">matchers</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
131
|
+
<span class="ruby-identifier">eliminated</span> = []
|
132
|
+
<span class="ruby-identifier">threads</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">thread</span><span class="ruby-operator">|</span>
|
133
|
+
<span class="ruby-identifier">matchers</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">matcher</span><span class="ruby-operator">|</span> <span class="ruby-identifier">eliminated</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">eliminate_methods</span>(<span class="ruby-identifier">thread</span>.<span class="ruby-identifier">methods</span>, <span class="ruby-identifier">matcher</span>)) }
|
134
|
+
<span class="ruby-keyword">end</span>
|
135
|
+
<span class="ruby-identifier">eliminated</span>
|
136
|
+
<span class="ruby-keyword">end</span></pre>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
</div>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
</div>
|
145
|
+
|
146
|
+
|
147
|
+
</section>
|
148
|
+
|
149
|
+
</section>
|
150
|
+
</main>
|
151
|
+
|
152
|
+
|
153
|
+
<footer id="validator-badges" role="contentinfo">
|
154
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
155
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
156
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
157
|
+
</footer>
|
158
|
+
|