ruby-prof 0.15.7 → 0.15.8

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.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +5 -0
  3. data/doc/created.rid +4 -4
  4. data/doc/js/search_index.js.gz +0 -0
  5. data/examples/graph.dot +53 -75
  6. data/examples/multi.flat.txt +21 -21
  7. data/examples/multi.graph.html +693 -839
  8. data/examples/multi.grind.dat +93 -173
  9. data/examples/multi.stack.html +411 -437
  10. data/examples/stack.html +411 -437
  11. data/lib/ruby-prof/assets/call_stack_printer.css.html +117 -0
  12. data/lib/ruby-prof/assets/call_stack_printer.js.html +385 -0
  13. data/lib/ruby-prof/assets/call_stack_printer.png +0 -0
  14. data/lib/ruby-prof/printers/flat_printer.rb +1 -1
  15. data/lib/ruby-prof/printers/graph_html_printer.rb +43 -48
  16. data/lib/ruby-prof/version.rb +1 -1
  17. data/ruby-prof.gemspec +1 -1
  18. data/test/measure_memory_test.rb +5 -3
  19. data/test/printers_test.rb +1 -1
  20. metadata +5 -58
  21. data/doc/LICENSE.html +0 -114
  22. data/doc/README_rdoc.html +0 -592
  23. data/doc/Rack.html +0 -95
  24. data/doc/Rack/RubyProf.html +0 -264
  25. data/doc/RubyProf.html +0 -961
  26. data/doc/RubyProf/AbstractPrinter.html +0 -546
  27. data/doc/RubyProf/AggregateCallInfo.html +0 -537
  28. data/doc/RubyProf/CallInfo.html +0 -716
  29. data/doc/RubyProf/CallInfoPrinter.html +0 -120
  30. data/doc/RubyProf/CallInfoVisitor.html +0 -198
  31. data/doc/RubyProf/CallStackPrinter.html +0 -1121
  32. data/doc/RubyProf/CallTreePrinter.html +0 -359
  33. data/doc/RubyProf/Cmd.html +0 -631
  34. data/doc/RubyProf/DotPrinter.html +0 -257
  35. data/doc/RubyProf/FlatPrinter.html +0 -163
  36. data/doc/RubyProf/FlatPrinterWithLineNumbers.html +0 -208
  37. data/doc/RubyProf/GraphHtmlPrinter.html +0 -579
  38. data/doc/RubyProf/GraphPrinter.html +0 -139
  39. data/doc/RubyProf/MethodInfo.html +0 -885
  40. data/doc/RubyProf/MultiPrinter.html +0 -358
  41. data/doc/RubyProf/Profile.html +0 -713
  42. data/doc/RubyProf/ProfileTask.html +0 -490
  43. data/doc/RubyProf/Thread.html +0 -303
  44. data/doc/examples/flat_txt.html +0 -149
  45. data/doc/examples/graph_html.html +0 -850
  46. data/doc/examples/graph_txt.html +0 -274
  47. data/doc/images/add.png +0 -0
  48. data/doc/images/arrow_up.png +0 -0
  49. data/doc/images/brick.png +0 -0
  50. data/doc/images/brick_link.png +0 -0
  51. data/doc/images/bug.png +0 -0
  52. data/doc/images/bullet_black.png +0 -0
  53. data/doc/images/bullet_toggle_minus.png +0 -0
  54. data/doc/images/bullet_toggle_plus.png +0 -0
  55. data/doc/images/date.png +0 -0
  56. data/doc/images/delete.png +0 -0
  57. data/doc/images/find.png +0 -0
  58. data/doc/images/macFFBgHack.png +0 -0
  59. data/doc/images/package.png +0 -0
  60. data/doc/images/page_green.png +0 -0
  61. data/doc/images/page_white_text.png +0 -0
  62. data/doc/images/page_white_width.png +0 -0
  63. data/doc/images/plugin.png +0 -0
  64. data/doc/images/ruby.png +0 -0
  65. data/doc/images/tag_blue.png +0 -0
  66. data/doc/images/tag_green.png +0 -0
  67. data/doc/images/transparent.png +0 -0
  68. data/doc/images/wrench.png +0 -0
  69. data/doc/images/wrench_orange.png +0 -0
  70. data/doc/images/zoom.png +0 -0
  71. data/doc/index.html +0 -618
  72. data/doc/table_of_contents.html +0 -934
  73. data/examples/empty.png +0 -0
  74. data/examples/graph.png +0 -0
  75. data/examples/minus.png +0 -0
  76. data/examples/plus.png +0 -0
@@ -1,579 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset="UTF-8">
6
-
7
- <title>class RubyProf::GraphHtmlPrinter - ruby-prof</title>
8
-
9
- <script type="text/javascript">
10
- var rdoc_rel_prefix = "../";
11
- </script>
12
-
13
- <script src="../js/jquery.js"></script>
14
- <script src="../js/darkfish.js"></script>
15
-
16
- <link href="../css/fonts.css" rel="stylesheet">
17
- <link href="../css/rdoc.css" rel="stylesheet">
18
-
19
-
20
-
21
- <body id="top" role="document" class="class">
22
- <nav role="navigation">
23
- <div id="project-navigation">
24
- <div id="home-section" role="region" title="Quick navigation" class="nav-section">
25
- <h2>
26
- <a href="../index.html" rel="home">Home</a>
27
- </h2>
28
-
29
- <div id="table-of-contents-navigation">
30
- <a href="../table_of_contents.html#pages">Pages</a>
31
- <a href="../table_of_contents.html#classes">Classes</a>
32
- <a href="../table_of_contents.html#methods">Methods</a>
33
- </div>
34
- </div>
35
-
36
- <div id="search-section" role="search" class="project-section initially-hidden">
37
- <form action="#" method="get" accept-charset="utf-8">
38
- <div id="search-field-wrapper">
39
- <input id="search-field" role="combobox" aria-label="Search"
40
- aria-autocomplete="list" aria-controls="search-results"
41
- type="text" name="search" placeholder="Search" spellcheck="false"
42
- title="Type to search, Up and Down to navigate, Enter to load">
43
- </div>
44
-
45
- <ul id="search-results" aria-label="Search Results"
46
- aria-busy="false" aria-expanded="false"
47
- aria-atomic="false" class="initially-hidden"></ul>
48
- </form>
49
- </div>
50
-
51
- </div>
52
-
53
-
54
-
55
- <div id="class-metadata">
56
-
57
- <div id="parent-class-section" class="nav-section">
58
- <h3>Parent</h3>
59
-
60
-
61
- <p class="link"><a href="AbstractPrinter.html">RubyProf::AbstractPrinter</a>
62
-
63
- </div>
64
-
65
- <div id="includes-section" class="nav-section">
66
- <h3>Included Modules</h3>
67
-
68
- <ul class="link-list">
69
-
70
-
71
- <li><span class="include">ERB::Util</span>
72
-
73
-
74
- </ul>
75
- </div>
76
-
77
-
78
- <!-- Method Quickref -->
79
- <div id="method-list-section" class="nav-section">
80
- <h3>Methods</h3>
81
-
82
- <ul class="link-list" role="directory">
83
-
84
- <li ><a href="#method-i-create_link">#create_link</a>
85
-
86
- <li ><a href="#method-i-file_link">#file_link</a>
87
-
88
- <li ><a href="#method-i-method_href">#method_href</a>
89
-
90
- <li ><a href="#method-i-print">#print</a>
91
-
92
- <li class="calls-super" ><a href="#method-i-setup_options">#setup_options</a>
93
-
94
- <li ><a href="#method-i-template">#template</a>
95
-
96
- </ul>
97
- </div>
98
-
99
- </div>
100
- </nav>
101
-
102
- <main role="main" aria-labelledby="class-RubyProf::GraphHtmlPrinter">
103
- <h1 id="class-RubyProf::GraphHtmlPrinter" class="class">
104
- class RubyProf::GraphHtmlPrinter
105
- </h1>
106
-
107
- <section class="description">
108
-
109
- <p>Generates <a href="../files/examples/graph_html.html">graph</a> profile
110
- reports as html. To use the graph html printer:</p>
111
-
112
- <pre>result = RubyProf.profile do
113
- [code to profile]
114
- end
115
-
116
- printer = RubyProf::GraphHtmlPrinter.new(result)
117
- printer.print(STDOUT, :min_percent=&gt;0)</pre>
118
-
119
- <p>The Graph printer takes the following options in its print methods:</p>
120
-
121
- <pre>:filename - specify a file to use that contains the ERB
122
- template to use, instead of the built-in self.template
123
-
124
- :template - specify an ERB template to use, instead of the
125
- built-in self.template</pre>
126
-
127
- </section>
128
-
129
-
130
-
131
-
132
- <section id="5Buntitled-5D" class="documentation-section">
133
-
134
-
135
-
136
-
137
-
138
- <section class="constants-list">
139
- <header>
140
- <h3>Constants</h3>
141
- </header>
142
- <dl>
143
-
144
- <dt id="CALL_WIDTH">CALL_WIDTH
145
-
146
- <dd>
147
-
148
-
149
- <dt id="PERCENTAGE_WIDTH">PERCENTAGE_WIDTH
150
-
151
- <dd>
152
-
153
-
154
- <dt id="TIME_WIDTH">TIME_WIDTH
155
-
156
- <dd>
157
-
158
-
159
- </dl>
160
- </section>
161
-
162
-
163
-
164
-
165
-
166
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
167
- <header>
168
- <h3>Public Instance Methods</h3>
169
- </header>
170
-
171
-
172
- <div id="method-i-create_link" class="method-detail ">
173
-
174
- <div class="method-heading">
175
- <span class="method-name">create_link</span><span
176
- class="method-args">(thread, overall_time, method)</span>
177
-
178
- <span class="method-click-advice">click to toggle source</span>
179
-
180
- </div>
181
-
182
-
183
- <div class="method-description">
184
-
185
- <p>Creates a link to a method. Note that we do not create links to methods
186
- which are under the min_perecent specified by the user, since they will not
187
- be printed out.</p>
188
-
189
-
190
-
191
-
192
- <div class="method-source-code" id="create_link-source">
193
- <pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 49</span>
194
- <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>)
195
- <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>
196
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">total_percent</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">min_percent</span>
197
- <span class="ruby-comment"># Just return name</span>
198
- <span class="ruby-identifier">h</span> <span class="ruby-identifier">method</span>.<span class="ruby-identifier">full_name</span>
199
- <span class="ruby-keyword">else</span>
200
- <span class="ruby-identifier">href</span> = <span class="ruby-string">&#39;#&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">method_href</span>(<span class="ruby-identifier">thread</span>, <span class="ruby-identifier">method</span>)
201
- <span class="ruby-node">&quot;&lt;a href=\&quot;#{href}\&quot;&gt;#{h method.full_name}&lt;/a&gt;&quot;</span>
202
- <span class="ruby-keyword">end</span>
203
- <span class="ruby-keyword">end</span></pre>
204
- </div>
205
-
206
- </div>
207
-
208
-
209
-
210
-
211
- </div>
212
-
213
-
214
- <div id="method-i-file_link" class="method-detail ">
215
-
216
- <div class="method-heading">
217
- <span class="method-name">file_link</span><span
218
- class="method-args">(path, linenum)</span>
219
-
220
- <span class="method-click-advice">click to toggle source</span>
221
-
222
- </div>
223
-
224
-
225
- <div class="method-description">
226
-
227
-
228
-
229
-
230
-
231
-
232
- <div class="method-source-code" id="file_link-source">
233
- <pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 64</span>
234
- <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>)
235
- <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>)
236
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">srcfile</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/\/ruby_runtime$/</span>
237
- <span class="ruby-string">&quot;&quot;</span>
238
- <span class="ruby-keyword">else</span>
239
- <span class="ruby-keyword">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/darwin/</span>
240
- <span class="ruby-node">&quot;&lt;a href=\&quot;txmt://open?url=file://#{h srcfile}&amp;line=#{linenum}\&quot; title=\&quot;#{h srcfile}:#{linenum}\&quot;&gt;#{linenum}&lt;/a&gt;&quot;</span>
241
- <span class="ruby-keyword">else</span>
242
- <span class="ruby-node">&quot;&lt;a href=\&quot;file://#{h srcfile}##{linenum}\&quot; title=\&quot;#{h srcfile}:#{linenum}\&quot;&gt;#{linenum}&lt;/a&gt;&quot;</span>
243
- <span class="ruby-keyword">end</span>
244
- <span class="ruby-keyword">end</span>
245
- <span class="ruby-keyword">end</span></pre>
246
- </div>
247
-
248
- </div>
249
-
250
-
251
-
252
-
253
- </div>
254
-
255
-
256
- <div id="method-i-method_href" class="method-detail ">
257
-
258
- <div class="method-heading">
259
- <span class="method-name">method_href</span><span
260
- class="method-args">(thread, method)</span>
261
-
262
- <span class="method-click-advice">click to toggle source</span>
263
-
264
- </div>
265
-
266
-
267
- <div class="method-description">
268
-
269
-
270
-
271
-
272
-
273
-
274
- <div class="method-source-code" id="method_href-source">
275
- <pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 60</span>
276
- <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>)
277
- <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">/[&gt;&lt;#\.\?=:]/</span>,<span class="ruby-string">&quot;_&quot;</span>) <span class="ruby-operator">+</span> <span class="ruby-string">&quot;_&quot;</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>)
278
- <span class="ruby-keyword">end</span></pre>
279
- </div>
280
-
281
- </div>
282
-
283
-
284
-
285
-
286
- </div>
287
-
288
-
289
- <div id="method-i-print" class="method-detail ">
290
-
291
- <div class="method-heading">
292
- <span class="method-name">print</span><span
293
- class="method-args">(output = STDOUT, options = {})</span>
294
-
295
- <span class="method-click-advice">click to toggle source</span>
296
-
297
- </div>
298
-
299
-
300
- <div class="method-description">
301
-
302
-
303
-
304
-
305
-
306
-
307
- <div class="method-source-code" id="print-source">
308
- <pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 39</span>
309
- <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> = {})
310
- <span class="ruby-ivar">@output</span> = <span class="ruby-identifier">output</span>
311
- <span class="ruby-identifier">setup_options</span>(<span class="ruby-identifier">options</span>)
312
- <span class="ruby-ivar">@output</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@erb</span>.<span class="ruby-identifier">result</span>(<span class="ruby-identifier">binding</span>)
313
- <span class="ruby-keyword">end</span></pre>
314
- </div>
315
-
316
- </div>
317
-
318
-
319
-
320
-
321
- </div>
322
-
323
-
324
- <div id="method-i-setup_options" class="method-detail ">
325
-
326
- <div class="method-heading">
327
- <span class="method-name">setup_options</span><span
328
- class="method-args">(options)</span>
329
-
330
- <span class="method-click-advice">click to toggle source</span>
331
-
332
- </div>
333
-
334
-
335
- <div class="method-description">
336
-
337
-
338
-
339
-
340
- <div class="method-calls-super">
341
- Calls superclass method
342
- <a href="AbstractPrinter.html#method-i-setup_options">RubyProf::AbstractPrinter#setup_options</a>
343
- </div>
344
-
345
-
346
-
347
- <div class="method-source-code" id="setup_options-source">
348
- <pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 30</span>
349
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">setup_options</span>(<span class="ruby-identifier">options</span>)
350
- <span class="ruby-keyword">super</span>(<span class="ruby-identifier">options</span>)
351
-
352
- <span class="ruby-identifier">filename</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:filename</span>]
353
- <span class="ruby-identifier">template</span> = <span class="ruby-identifier">filename</span> <span class="ruby-operator">?</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">filename</span>).<span class="ruby-identifier">untaint</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">options</span>[<span class="ruby-value">:template</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">template</span>)
354
- <span class="ruby-ivar">@erb</span> = <span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">template</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-keyword">nil</span>)
355
- <span class="ruby-ivar">@erb</span>.<span class="ruby-identifier">filename</span> = <span class="ruby-identifier">filename</span>
356
- <span class="ruby-keyword">end</span></pre>
357
- </div>
358
-
359
- </div>
360
-
361
-
362
-
363
-
364
- </div>
365
-
366
-
367
- <div id="method-i-template" class="method-detail ">
368
-
369
- <div class="method-heading">
370
- <span class="method-name">template</span><span
371
- class="method-args">()</span>
372
-
373
- <span class="method-click-advice">click to toggle source</span>
374
-
375
- </div>
376
-
377
-
378
- <div class="method-description">
379
-
380
-
381
-
382
-
383
-
384
-
385
- <div class="method-source-code" id="template-source">
386
- <pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 77</span>
387
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">template</span>
388
- <span class="ruby-string">&#39;
389
- &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
390
- &lt;html&gt;
391
- &lt;head&gt;
392
- &lt;style media=&quot;all&quot; type=&quot;text/css&quot;&gt;
393
- table {
394
- border-collapse: collapse;
395
- border: 1px solid #CCC;
396
- font-family: Verdana, Arial, Helvetica, sans-serif;
397
- font-size: 9pt;
398
- line-height: normal;
399
- width: 100%;
400
- }
401
-
402
- th {
403
- text-align: center;
404
- border-top: 1px solid #FB7A31;
405
- border-bottom: 1px solid #FB7A31;
406
- background: #FFC;
407
- padding: 0.3em;
408
- border-left: 1px solid silver;
409
- }
410
-
411
- tr.break td {
412
- border: 0;
413
- border-top: 1px solid #FB7A31;
414
- padding: 0;
415
- margin: 0;
416
- }
417
-
418
- tr.method td {
419
- font-weight: bold;
420
- }
421
-
422
- td {
423
- padding: 0.3em;
424
- }
425
-
426
- td:first-child {
427
- width: 190px;
428
- }
429
-
430
- td {
431
- border-left: 1px solid #CCC;
432
- text-align: center;
433
- }
434
-
435
- .method_name {
436
- text-align: left;
437
- }
438
-
439
- tfoot td {
440
- text-align: left;
441
- }
442
- &lt;/style&gt;
443
- &lt;/head&gt;
444
- &lt;body&gt;
445
- &lt;h1&gt;Profile Report: &lt;%= RubyProf.measure_mode_string %&gt;&lt;/h1&gt;
446
- &lt;!-- Threads Table --&gt;
447
- &lt;table&gt;
448
- &lt;tr&gt;
449
- &lt;th&gt;Thread ID&lt;/th&gt;
450
- &lt;th&gt;Fiber ID&lt;/th&gt;
451
- &lt;th&gt;Total Time&lt;/th&gt;
452
- &lt;/tr&gt;
453
- &lt;% for thread in @result.threads %&gt;
454
- &lt;tr&gt;
455
- &lt;td&gt;&lt;%= thread.id %&gt;&lt;/td&gt;
456
- &lt;td&gt;&lt;a href=&quot;#&lt;%= thread.fiber_id %&gt;&quot;&gt;&lt;%= thread.fiber_id %&gt;&lt;/a&gt;&lt;/td&gt;
457
- &lt;td&gt;&lt;%= thread.total_time %&gt;&lt;/td&gt;
458
- &lt;/tr&gt;
459
- &lt;% end %&gt;
460
- &lt;/table&gt;
461
-
462
- &lt;!-- Methods Tables --&gt;
463
- &lt;% for thread in @result.threads
464
- methods = thread.methods
465
- total_time = thread.total_time %&gt;
466
- &lt;h2&gt;&lt;a name=&quot;&lt;%= thread.fiber_id %&gt;&quot;&gt;Thread &lt;%= thread.id %&gt;, Fiber: &lt;%= thread.fiber_id %&gt;&lt;/a&gt;&lt;/h2&gt;
467
- &lt;table&gt;
468
- &lt;thead&gt;
469
- &lt;tr&gt;
470
- &lt;th&gt;&lt;%= sprintf(&quot;%#{PERCENTAGE_WIDTH}s&quot;, &quot;%Total&quot;) %&gt;&lt;/th&gt;
471
- &lt;th&gt;&lt;%= sprintf(&quot;%#{PERCENTAGE_WIDTH}s&quot;, &quot;%Self&quot;) %&gt;&lt;/th&gt;
472
- &lt;th&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}s&quot;, &quot;Total&quot;) %&gt;&lt;/th&gt;
473
- &lt;th&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}s&quot;, &quot;Self&quot;) %&gt;&lt;/th&gt;
474
- &lt;th&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}s&quot;, &quot;Wait&quot;) %&gt;&lt;/th&gt;
475
- &lt;th&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH+2}s&quot;, &quot;Child&quot;) %&gt;&lt;/th&gt;
476
- &lt;th&gt;&lt;%= sprintf(&quot;%#{CALL_WIDTH}s&quot;, &quot;Calls&quot;) %&gt;&lt;/th&gt;
477
- &lt;th class=&quot;method_name&quot;&gt;Name&lt;/th&gt;
478
- &lt;th&gt;Line&lt;/th&gt;
479
- &lt;/tr&gt;
480
- &lt;/thead&gt;
481
-
482
- &lt;tbody&gt;
483
- &lt;% min_time = @options[:min_time] || (@options[:nonzero] ? 0.005 : nil)
484
- methods.sort_by(&amp;sort_method).reverse_each do |method|
485
- total_percentage = (method.total_time/total_time) * 100
486
-
487
- next if total_percentage &lt; min_percent
488
- next if min_time &amp;&amp; method.total_time &lt; min_time
489
-
490
- self_percentage = (method.self_time/total_time) * 100 %&gt;
491
-
492
- &lt;!-- Parents --&gt;
493
- &lt;% for caller in method.aggregate_parents.sort_by(&amp;:total_time)
494
- next unless caller.parent
495
- next if min_time &amp;&amp; caller.total_time &lt; min_time %&gt;
496
- &lt;tr&gt;
497
- &lt;td&gt;&amp;nbsp;&lt;/td&gt;
498
- &lt;td&gt;&amp;nbsp;&lt;/td&gt;
499
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, caller.total_time) %&gt;&lt;/td&gt;
500
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, caller.self_time) %&gt;&lt;/td&gt;
501
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, caller.wait_time) %&gt;&lt;/td&gt;
502
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, caller.children_time) %&gt;&lt;/td&gt;
503
- &lt;% called = &quot;#{caller.called}/#{method.called}&quot; %&gt;
504
- &lt;td&gt;&lt;%= sprintf(&quot;%#{CALL_WIDTH}s&quot;, called) %&gt;&lt;/td&gt;
505
- &lt;td class=&quot;method_name&quot;&gt;&lt;%= create_link(thread, total_time, caller.parent.target) %&gt;&lt;/td&gt;
506
- &lt;td&gt;&lt;%= file_link(caller.parent.target.source_file, caller.line) %&gt;&lt;/td&gt;
507
- &lt;/tr&gt;
508
- &lt;% end %&gt;
509
-
510
- &lt;tr class=&quot;method&quot;&gt;
511
- &lt;td&gt;&lt;%= sprintf(&quot;%#{PERCENTAGE_WIDTH-1}.2f\%&quot;, total_percentage) %&gt;&lt;/td&gt;
512
- &lt;td&gt;&lt;%= sprintf(&quot;%#{PERCENTAGE_WIDTH-1}.2f\%&quot;, self_percentage) %&gt;&lt;/td&gt;
513
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, method.total_time) %&gt;&lt;/td&gt;
514
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, method.self_time) %&gt;&lt;/td&gt;
515
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, method.wait_time) %&gt;&lt;/td&gt;
516
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, method.children_time) %&gt;&lt;/td&gt;
517
- &lt;td&gt;&lt;%= sprintf(&quot;%#{CALL_WIDTH}i&quot;, method.called) %&gt;&lt;/td&gt;
518
- &lt;td class=&quot;method_name&quot;&gt;
519
- &lt;a name=&quot;&lt;%= method_href(thread, method) %&gt;&quot;&gt;
520
- &lt;%= method.recursive? ? &quot;*&quot; : &quot; &quot;%&gt;&lt;%= h method.full_name %&gt;
521
- &lt;/a&gt;
522
- &lt;/td&gt;
523
- &lt;td&gt;&lt;%= file_link(method.source_file, method.line) %&gt;&lt;/td&gt;
524
- &lt;/tr&gt;
525
-
526
- &lt;!-- Children --&gt;
527
- &lt;% method.recalc_recursion unless method.non_recursive? %&gt;
528
- &lt;% for callee in method.aggregate_children.sort_by(&amp;:total_time).reverse %&gt;
529
- &lt;% next if min_time &amp;&amp; callee.total_time &lt; min_time %&gt;
530
- &lt;tr&gt;
531
- &lt;td&gt;&amp;nbsp;&lt;/td&gt;
532
- &lt;td&gt;&amp;nbsp;&lt;/td&gt;
533
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, callee.total_time) %&gt;&lt;/td&gt;
534
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, callee.self_time) %&gt;&lt;/td&gt;
535
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, callee.wait_time) %&gt;&lt;/td&gt;
536
- &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, callee.children_time) %&gt;&lt;/td&gt;
537
- &lt;% called = &quot;#{callee.called}/#{callee.target.called}&quot; %&gt;
538
- &lt;td&gt;&lt;%= sprintf(&quot;%#{CALL_WIDTH}s&quot;, called) %&gt;&lt;/td&gt;
539
- &lt;td class=&quot;method_name&quot;&gt;&lt;%= create_link(thread, total_time, callee.target) %&gt;&lt;/td&gt;
540
- &lt;td&gt;&lt;%= file_link(method.source_file, callee.line) %&gt;&lt;/td&gt;
541
- &lt;/tr&gt;
542
- &lt;% end %&gt;
543
- &lt;!-- Create divider row --&gt;
544
- &lt;tr class=&quot;break&quot;&gt;&lt;td colspan=&quot;9&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
545
- &lt;% thread.recalc_recursion unless method.non_recursive? %&gt;
546
- &lt;% end %&gt;
547
- &lt;/tbody&gt;
548
- &lt;tfoot&gt;
549
- &lt;tr&gt;
550
- &lt;td colspan=&quot;9&quot;&gt;* indicates recursively called methods&lt;/td&gt;
551
- &lt;/tr&gt;
552
- &lt;/tfoot&gt;
553
- &lt;/table&gt;
554
- &lt;% end %&gt;
555
- &lt;/body&gt;
556
- &lt;/html&gt;&#39;</span>
557
- <span class="ruby-keyword">end</span></pre>
558
- </div>
559
-
560
- </div>
561
-
562
-
563
-
564
-
565
- </div>
566
-
567
-
568
- </section>
569
-
570
- </section>
571
- </main>
572
-
573
-
574
- <footer id="validator-badges" role="contentinfo">
575
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
576
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
577
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
578
- </footer>
579
-