ruby-prof 0.12.1 → 0.12.2

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