ruby-prof 0.15.4 → 0.15.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +7 -1
  3. data/README.rdoc +1 -1
  4. data/bin/ruby-prof +16 -4
  5. data/doc/LICENSE.html +114 -0
  6. data/doc/README_rdoc.html +592 -0
  7. data/doc/Rack.html +95 -0
  8. data/doc/Rack/RubyProf.html +264 -0
  9. data/doc/RubyProf.html +962 -0
  10. data/doc/RubyProf/AbstractPrinter.html +546 -0
  11. data/doc/RubyProf/AggregateCallInfo.html +537 -0
  12. data/doc/RubyProf/CallInfo.html +468 -0
  13. data/doc/RubyProf/CallInfoPrinter.html +120 -0
  14. data/doc/RubyProf/CallInfoVisitor.html +200 -0
  15. data/doc/RubyProf/CallStackPrinter.html +1604 -0
  16. data/doc/RubyProf/CallTreePrinter.html +359 -0
  17. data/doc/RubyProf/Cmd.html +631 -0
  18. data/doc/RubyProf/DotPrinter.html +257 -0
  19. data/doc/RubyProf/FlatPrinter.html +163 -0
  20. data/doc/RubyProf/FlatPrinterWithLineNumbers.html +208 -0
  21. data/doc/RubyProf/GraphHtmlPrinter.html +575 -0
  22. data/doc/RubyProf/GraphPrinter.html +139 -0
  23. data/doc/RubyProf/MethodInfo.html +685 -0
  24. data/doc/RubyProf/MultiPrinter.html +358 -0
  25. data/doc/RubyProf/Profile.html +764 -0
  26. data/doc/RubyProf/ProfileTask.html +490 -0
  27. data/doc/RubyProf/Thread.html +199 -0
  28. data/doc/created.rid +14 -14
  29. data/doc/examples/flat_txt.html +149 -0
  30. data/doc/examples/graph_html.html +850 -0
  31. data/doc/examples/graph_txt.html +274 -0
  32. data/doc/images/add.png +0 -0
  33. data/doc/images/arrow_up.png +0 -0
  34. data/doc/images/brick.png +0 -0
  35. data/doc/images/brick_link.png +0 -0
  36. data/doc/images/bug.png +0 -0
  37. data/doc/images/bullet_black.png +0 -0
  38. data/doc/images/bullet_toggle_minus.png +0 -0
  39. data/doc/images/bullet_toggle_plus.png +0 -0
  40. data/doc/images/date.png +0 -0
  41. data/doc/images/delete.png +0 -0
  42. data/doc/images/find.png +0 -0
  43. data/doc/images/macFFBgHack.png +0 -0
  44. data/doc/images/package.png +0 -0
  45. data/doc/images/page_green.png +0 -0
  46. data/doc/images/page_white_text.png +0 -0
  47. data/doc/images/page_white_width.png +0 -0
  48. data/doc/images/plugin.png +0 -0
  49. data/doc/images/ruby.png +0 -0
  50. data/doc/images/tag_blue.png +0 -0
  51. data/doc/images/tag_green.png +0 -0
  52. data/doc/images/transparent.png +0 -0
  53. data/doc/images/wrench.png +0 -0
  54. data/doc/images/wrench_orange.png +0 -0
  55. data/doc/images/zoom.png +0 -0
  56. data/doc/index.html +618 -0
  57. data/doc/js/search_index.js.gz +0 -0
  58. data/doc/table_of_contents.html +859 -0
  59. data/lib/ruby-prof/printers/flat_printer_with_line_numbers.rb +21 -14
  60. data/lib/ruby-prof/printers/graph_printer.rb +1 -0
  61. data/lib/ruby-prof/version.rb +1 -1
  62. data/test/measure_cpu_time_test.rb +1 -1
  63. metadata +54 -2
@@ -0,0 +1,575 @@
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;/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
+ next if total_percentage &lt; min_percent
487
+ next if min_time &amp;&amp; method.total_time &lt; min_time
488
+ self_percentage = (method.self_time/total_time) * 100 %&gt;
489
+
490
+ &lt;!-- Parents --&gt;
491
+ &lt;% for caller in method.aggregate_parents.sort_by(&amp;:total_time)
492
+ next unless caller.parent
493
+ next if min_time &amp;&amp; caller.total_time &lt; min_time %&gt;
494
+ &lt;tr&gt;
495
+ &lt;td&gt;&amp;nbsp;&lt;/td&gt;
496
+ &lt;td&gt;&amp;nbsp;&lt;/td&gt;
497
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, caller.total_time) %&gt;&lt;/td&gt;
498
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, caller.self_time) %&gt;&lt;/td&gt;
499
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, caller.wait_time) %&gt;&lt;/td&gt;
500
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, caller.children_time) %&gt;&lt;/td&gt;
501
+ &lt;% called = &quot;#{caller.called}/#{method.called}&quot; %&gt;
502
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{CALL_WIDTH}s&quot;, called) %&gt;&lt;/td&gt;
503
+ &lt;td class=&quot;method_name&quot;&gt;&lt;%= create_link(thread, total_time, caller.parent.target) %&gt;&lt;/td&gt;
504
+ &lt;td&gt;&lt;%= file_link(caller.parent.target.source_file, caller.line) %&gt;&lt;/td&gt;
505
+ &lt;/tr&gt;
506
+ &lt;% end %&gt;
507
+
508
+ &lt;tr class=&quot;method&quot;&gt;
509
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{PERCENTAGE_WIDTH-1}.2f\%&quot;, total_percentage) %&gt;&lt;/td&gt;
510
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{PERCENTAGE_WIDTH-1}.2f\%&quot;, self_percentage) %&gt;&lt;/td&gt;
511
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, method.total_time) %&gt;&lt;/td&gt;
512
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, method.self_time) %&gt;&lt;/td&gt;
513
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, method.wait_time) %&gt;&lt;/td&gt;
514
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, method.children_time) %&gt;&lt;/td&gt;
515
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{CALL_WIDTH}i&quot;, method.called) %&gt;&lt;/td&gt;
516
+ &lt;td class=&quot;method_name&quot;&gt;
517
+ &lt;a name=&quot;&lt;%= method_href(thread, method) %&gt;&quot;&gt;
518
+ &lt;%= method.recursive? ? &quot;*&quot; : &quot; &quot;%&gt;&lt;%= h method.full_name %&gt;
519
+ &lt;/a&gt;
520
+ &lt;/td&gt;
521
+ &lt;td&gt;&lt;%= file_link(method.source_file, method.line) %&gt;&lt;/td&gt;
522
+ &lt;/tr&gt;
523
+
524
+ &lt;!-- Children --&gt;
525
+ &lt;% for callee in method.aggregate_children.sort_by(&amp;:total_time).reverse %&gt;
526
+ &lt;% next if min_time &amp;&amp; callee.total_time &lt; min_time %&gt;
527
+ &lt;tr&gt;
528
+ &lt;td&gt;&amp;nbsp;&lt;/td&gt;
529
+ &lt;td&gt;&amp;nbsp;&lt;/td&gt;
530
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, callee.total_time) %&gt;&lt;/td&gt;
531
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, callee.self_time) %&gt;&lt;/td&gt;
532
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, callee.wait_time) %&gt;&lt;/td&gt;
533
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{TIME_WIDTH}.2f&quot;, callee.children_time) %&gt;&lt;/td&gt;
534
+ &lt;% called = &quot;#{callee.called}/#{callee.target.called}&quot; %&gt;
535
+ &lt;td&gt;&lt;%= sprintf(&quot;%#{CALL_WIDTH}s&quot;, called) %&gt;&lt;/td&gt;
536
+ &lt;td class=&quot;method_name&quot;&gt;&lt;%= create_link(thread, total_time, callee.target) %&gt;&lt;/td&gt;
537
+ &lt;td&gt;&lt;%= file_link(method.source_file, callee.line) %&gt;&lt;/td&gt;
538
+ &lt;/tr&gt;
539
+ &lt;% end %&gt;
540
+ &lt;!-- Create divider row --&gt;
541
+ &lt;tr class=&quot;break&quot;&gt;&lt;td colspan=&quot;9&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
542
+ &lt;% end %&gt;
543
+ &lt;/tbody&gt;
544
+ &lt;tfoot&gt;
545
+ &lt;tr&gt;
546
+ &lt;td colspan=&quot;9&quot;&gt;* indicates recursively called methods&lt;/td&gt;
547
+ &lt;/tr&gt;
548
+ &lt;/tfoot&gt;
549
+ &lt;/table&gt;
550
+ &lt;% end %&gt;
551
+ &lt;/body&gt;
552
+ &lt;/html&gt;&#39;</span>
553
+ <span class="ruby-keyword">end</span></pre>
554
+ </div>
555
+
556
+ </div>
557
+
558
+
559
+
560
+
561
+ </div>
562
+
563
+
564
+ </section>
565
+
566
+ </section>
567
+ </main>
568
+
569
+
570
+ <footer id="validator-badges" role="contentinfo">
571
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
572
+ <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
573
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
574
+ </footer>
575
+