ruby-prof 0.13.1 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +14 -0
  3. data/README.rdoc +1 -1
  4. data/Rakefile +2 -3
  5. data/bin/ruby-prof +4 -4
  6. data/bin/ruby-prof-check-trace +45 -0
  7. data/doc/LICENSE.html +49 -88
  8. data/doc/README_rdoc.html +92 -106
  9. data/doc/Rack.html +47 -116
  10. data/doc/Rack/RubyProf.html +119 -174
  11. data/doc/RubyProf.html +184 -216
  12. data/doc/RubyProf/AbstractPrinter.html +131 -162
  13. data/doc/RubyProf/AggregateCallInfo.html +136 -166
  14. data/doc/RubyProf/CallInfo.html +113 -154
  15. data/doc/RubyProf/CallInfoPrinter.html +56 -123
  16. data/doc/RubyProf/CallInfoVisitor.html +87 -216
  17. data/doc/RubyProf/CallStackPrinter.html +222 -215
  18. data/doc/RubyProf/CallTreePrinter.html +91 -142
  19. data/doc/RubyProf/Cmd.html +115 -157
  20. data/doc/RubyProf/DotPrinter.html +88 -140
  21. data/doc/RubyProf/FlatPrinter.html +66 -129
  22. data/doc/RubyProf/FlatPrinterWithLineNumbers.html +69 -132
  23. data/doc/RubyProf/GraphHtmlPrinter.html +115 -166
  24. data/doc/RubyProf/GraphPrinter.html +58 -125
  25. data/doc/RubyProf/MethodInfo.html +147 -172
  26. data/doc/RubyProf/MultiPrinter.html +104 -150
  27. data/doc/RubyProf/Profile.html +125 -179
  28. data/doc/RubyProf/ProfileTask.html +117 -157
  29. data/doc/RubyProf/Test.html +115 -154
  30. data/doc/RubyProf/Thread.html +87 -147
  31. data/doc/created.rid +13 -14
  32. data/doc/examples/flat_txt.html +51 -90
  33. data/doc/examples/graph_html.html +852 -0
  34. data/doc/examples/graph_txt.html +64 -92
  35. data/doc/fonts.css +167 -0
  36. data/doc/fonts/Lato-Light.ttf +0 -0
  37. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  38. data/doc/fonts/Lato-Regular.ttf +0 -0
  39. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  40. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  41. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  42. data/doc/images/add.png +0 -0
  43. data/doc/images/arrow_up.png +0 -0
  44. data/doc/images/delete.png +0 -0
  45. data/doc/images/tag_blue.png +0 -0
  46. data/doc/index.html +75 -65
  47. data/doc/js/darkfish.js +0 -15
  48. data/doc/js/search.js +20 -5
  49. data/doc/js/search_index.js +1 -1
  50. data/doc/rdoc.css +255 -218
  51. data/doc/table_of_contents.html +751 -353
  52. data/ext/ruby_prof/extconf.rb +20 -22
  53. data/ext/ruby_prof/rp_measure_allocations.c +9 -5
  54. data/ext/ruby_prof/rp_measure_gc_runs.c +8 -0
  55. data/ext/ruby_prof/rp_measure_gc_time.c +5 -2
  56. data/ext/ruby_prof/rp_measure_wall_time.c +1 -0
  57. data/ext/ruby_prof/rp_method.c +0 -9
  58. data/ext/ruby_prof/rp_method.h +1 -6
  59. data/ext/ruby_prof/ruby_prof.c +32 -112
  60. data/ext/ruby_prof/ruby_prof.h +9 -10
  61. data/lib/ruby-prof.rb +2 -1
  62. data/lib/ruby-prof/aggregate_call_info.rb +4 -6
  63. data/lib/ruby-prof/call_info_visitor.rb +42 -44
  64. data/lib/ruby-prof/printers/graph_html_printer.rb +0 -8
  65. data/lib/ruby-prof/profile.rb +4 -4
  66. data/lib/ruby-prof/rack.rb +47 -47
  67. data/lib/ruby-prof/task.rb +0 -0
  68. data/lib/ruby-prof/thread.rb +22 -22
  69. data/lib/ruby-prof/version.rb +3 -0
  70. data/ruby-prof.gemspec +7 -11
  71. data/test/call_info_test.rb +78 -78
  72. data/test/call_info_visitor_test.rb +31 -31
  73. data/test/fiber_test.rb +2 -2
  74. data/test/measure_gc_runs_test.rb +1 -1
  75. data/test/measure_process_time_test.rb +7 -6
  76. data/test/printers_test.rb +4 -8
  77. data/test/recursive_test.rb +5 -9
  78. data/test/test_helper.rb +1 -1
  79. data/test/unique_call_path_test.rb +7 -29
  80. data/test/yarv_test.rb +55 -0
  81. metadata +63 -55
  82. data/ext/ruby_prof/version.h +0 -7
  83. data/lib/ruby-prof/test.rb +0 -150
  84. data/test/exec_test.rb +0 -14
  85. data/test/test_suite.rb +0 -37
@@ -2,157 +2,91 @@
2
2
 
3
3
  <html>
4
4
  <head>
5
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
5
+ <meta charset="UTF-8">
6
6
 
7
7
  <title>class RubyProf::FlatPrinterWithLineNumbers - ruby-prof</title>
8
8
 
9
- <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
9
+ <link href="../fonts.css" rel="stylesheet">
10
+ <link href="../rdoc.css" rel="stylesheet">
10
11
 
11
12
  <script type="text/javascript">
12
13
  var rdoc_rel_prefix = "../";
13
14
  </script>
14
15
 
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>
16
+ <script src="../js/jquery.js"></script>
17
+ <script src="../js/navigation.js"></script>
18
+ <script src="../js/search_index.js"></script>
19
+ <script src="../js/search.js"></script>
20
+ <script src="../js/searcher.js"></script>
21
+ <script src="../js/darkfish.js"></script>
21
22
 
22
23
 
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>
24
+ <body id="top" role="document" class="class">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../table_of_contents.html#pages">Pages</a>
28
34
  <a href="../table_of_contents.html#classes">Classes</a>
29
35
  <a href="../table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
32
-
36
+ </div>
37
+ </div>
33
38
 
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
35
40
  <form action="#" method="get" accept-charset="utf-8">
36
- <h3 class="section-header">
37
- <input type="text" name="search" placeholder="Search" id="search-field"
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
38
45
  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
-
46
+ </div>
45
47
 
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>
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
53
 
54
-
55
54
  </div>
56
55
 
56
+
57
+
57
58
  <div id="class-metadata">
58
59
 
59
- <nav id="parent-class-section" class="section">
60
- <h3 class="section-header">Parent</h3>
60
+ <div id="parent-class-section" class="nav-section">
61
+ <h3>Parent</h3>
62
+
61
63
 
62
64
  <p class="link"><a href="FlatPrinter.html">RubyProf::FlatPrinter</a>
63
65
 
64
- </nav>
66
+ </div>
65
67
 
66
68
 
69
+
67
70
  <!-- Method Quickref -->
68
- <nav id="method-list-section" class="section">
69
- <h3 class="section-header">Methods</h3>
71
+ <div id="method-list-section" class="nav-section">
72
+ <h3>Methods</h3>
70
73
 
71
- <ul class="link-list">
74
+ <ul class="link-list" role="directory">
72
75
 
73
- <li><a href="#method-i-print_methods">#print_methods</a>
76
+ <li ><a href="#method-i-print_methods">#print_methods</a>
74
77
 
75
78
  </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>
79
+ </div>
148
80
 
149
81
  </div>
150
82
  </nav>
151
83
 
152
- <div id="documentation">
153
- <h1 class="class">class RubyProf::FlatPrinterWithLineNumbers</h1>
84
+ <main role="main" aria-labelledby="class-RubyProf::FlatPrinterWithLineNumbers">
85
+ <h1 id="class-RubyProf::FlatPrinterWithLineNumbers" class="class">
86
+ class RubyProf::FlatPrinterWithLineNumbers
87
+ </h1>
154
88
 
155
- <div id="description" class="description">
89
+ <section class="description">
156
90
 
157
91
  <p>Generates <a href="../files/examples/flat_txt.html">flat</a> profile
158
92
  reports as text. To use the flat printer with line numbers:</p>
@@ -164,7 +98,7 @@ end
164
98
  printer = RubyProf::FlatPrinterWithLineNumbers.new(result)
165
99
  printer.print(STDOUT, {})</pre>
166
100
 
167
- </div><!-- description -->
101
+ </section>
168
102
 
169
103
 
170
104
 
@@ -178,10 +112,11 @@ printer.print(STDOUT, {})</pre>
178
112
 
179
113
 
180
114
 
181
- <!-- Methods -->
182
115
 
183
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
184
- <h3 class="section-header">Public Instance Methods</h3>
116
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
117
+ <header>
118
+ <h3>Public Instance Methods</h3>
119
+ </header>
185
120
 
186
121
 
187
122
  <div id="method-i-print_methods" class="method-detail ">
@@ -189,7 +124,9 @@ printer.print(STDOUT, {})</pre>
189
124
  <div class="method-heading">
190
125
  <span class="method-name">print_methods</span><span
191
126
  class="method-args">(thread)</span>
127
+
192
128
  <span class="method-click-advice">click to toggle source</span>
129
+
193
130
  </div>
194
131
 
195
132
 
@@ -197,6 +134,7 @@ printer.print(STDOUT, {})</pre>
197
134
 
198
135
 
199
136
 
137
+
200
138
 
201
139
 
202
140
  <div class="method-source-code" id="print_methods-source">
@@ -204,10 +142,10 @@ printer.print(STDOUT, {})</pre>
204
142
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">print_methods</span>(<span class="ruby-identifier">thread</span>)
205
143
  <span class="ruby-identifier">total_time</span> = <span class="ruby-identifier">thread</span>.<span class="ruby-identifier">total_time</span>
206
144
 
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>
145
+ <span class="ruby-identifier">methods</span> = <span class="ruby-identifier">thread</span>.<span class="ruby-identifier">methods</span>.<span class="ruby-identifier">sort_by</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">sort_method</span>).<span class="ruby-identifier">reverse</span>
208
146
  <span class="ruby-identifier">sum</span> = <span class="ruby-value">0</span>
209
147
  <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>
148
+ <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-operator">*</span> <span class="ruby-value">100</span>
211
149
  <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
150
 
213
151
  <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">method</span>.<span class="ruby-identifier">self_time</span>
@@ -215,7 +153,7 @@ printer.print(STDOUT, {})</pre>
215
153
  <span class="ruby-comment">#total_time_called = method.called &gt; 0? method.total_time/method.called : 0</span>
216
154
 
217
155
  <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>
156
+ <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-operator">*</span> <span class="ruby-value">100</span>, <span class="ruby-comment"># %self</span>
219
157
  <span class="ruby-identifier">method</span>.<span class="ruby-identifier">total_time</span>, <span class="ruby-comment"># total</span>
220
158
  <span class="ruby-identifier">method</span>.<span class="ruby-identifier">self_time</span>, <span class="ruby-comment"># self</span>
221
159
  <span class="ruby-identifier">method</span>.<span class="ruby-identifier">wait_time</span>, <span class="ruby-comment"># wait</span>
@@ -242,26 +180,25 @@ printer.print(STDOUT, {})</pre>
242
180
  <span class="ruby-ivar">@output</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n\n&quot;</span>
243
181
  <span class="ruby-keyword">end</span>
244
182
  <span class="ruby-keyword">end</span></pre>
245
- </div><!-- print_methods-source -->
183
+ </div>
246
184
 
247
185
  </div>
248
186
 
249
187
 
250
188
 
251
189
 
252
- </div><!-- print_methods-method -->
190
+ </div>
253
191
 
254
192
 
255
- </section><!-- public-instance-method-details -->
193
+ </section>
256
194
 
257
- </section><!-- 5Buntitled-5D -->
258
-
259
- </div><!-- documentation -->
195
+ </section>
196
+ </main>
260
197
 
261
198
 
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.1.
265
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
199
+ <footer id="validator-badges" role="contentinfo">
200
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
201
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
202
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
266
203
  </footer>
267
204
 
@@ -2,70 +2,71 @@
2
2
 
3
3
  <html>
4
4
  <head>
5
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
5
+ <meta charset="UTF-8">
6
6
 
7
7
  <title>class RubyProf::GraphHtmlPrinter - ruby-prof</title>
8
8
 
9
- <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
9
+ <link href="../fonts.css" rel="stylesheet">
10
+ <link href="../rdoc.css" rel="stylesheet">
10
11
 
11
12
  <script type="text/javascript">
12
13
  var rdoc_rel_prefix = "../";
13
14
  </script>
14
15
 
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>
16
+ <script src="../js/jquery.js"></script>
17
+ <script src="../js/navigation.js"></script>
18
+ <script src="../js/search_index.js"></script>
19
+ <script src="../js/search.js"></script>
20
+ <script src="../js/searcher.js"></script>
21
+ <script src="../js/darkfish.js"></script>
21
22
 
22
23
 
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>
24
+ <body id="top" role="document" class="class">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../table_of_contents.html#pages">Pages</a>
28
34
  <a href="../table_of_contents.html#classes">Classes</a>
29
35
  <a href="../table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
32
-
36
+ </div>
37
+ </div>
33
38
 
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
35
40
  <form action="#" method="get" accept-charset="utf-8">
36
- <h3 class="section-header">
37
- <input type="text" name="search" placeholder="Search" id="search-field"
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
38
45
  title="Type to search, Up and Down to navigate, Enter to load">
39
- </h3>
40
- </form>
46
+ </div>
41
47
 
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>
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
53
 
54
-
55
54
  </div>
56
55
 
56
+
57
+
57
58
  <div id="class-metadata">
58
59
 
59
- <nav id="parent-class-section" class="section">
60
- <h3 class="section-header">Parent</h3>
60
+ <div id="parent-class-section" class="nav-section">
61
+ <h3>Parent</h3>
62
+
61
63
 
62
64
  <p class="link"><a href="AbstractPrinter.html">RubyProf::AbstractPrinter</a>
63
65
 
64
- </nav>
66
+ </div>
65
67
 
66
- <!-- Included Modules -->
67
- <nav id="includes-section" class="section">
68
- <h3 class="section-header">Included Modules</h3>
68
+ <div id="includes-section" class="nav-section">
69
+ <h3>Included Modules</h3>
69
70
 
70
71
  <ul class="link-list">
71
72
 
@@ -74,107 +75,39 @@
74
75
 
75
76
 
76
77
  </ul>
77
- </nav>
78
+ </div>
78
79
 
80
+
79
81
  <!-- Method Quickref -->
80
- <nav id="method-list-section" class="section">
81
- <h3 class="section-header">Methods</h3>
82
+ <div id="method-list-section" class="nav-section">
83
+ <h3>Methods</h3>
82
84
 
83
- <ul class="link-list">
85
+ <ul class="link-list" role="directory">
84
86
 
85
- <li><a href="#method-i-create_link">#create_link</a>
87
+ <li ><a href="#method-i-create_link">#create_link</a>
86
88
 
87
- <li><a href="#method-i-file_link">#file_link</a>
89
+ <li ><a href="#method-i-file_link">#file_link</a>
88
90
 
89
- <li><a href="#method-i-method_href">#method_href</a>
91
+ <li ><a href="#method-i-method_href">#method_href</a>
90
92
 
91
- <li><a href="#method-i-print">#print</a>
93
+ <li ><a href="#method-i-print">#print</a>
92
94
 
93
- <li><a href="#method-i-setup_options">#setup_options</a>
95
+ <li class="calls-super" ><a href="#method-i-setup_options">#setup_options</a>
94
96
 
95
- <li><a href="#method-i-template">#template</a>
97
+ <li ><a href="#method-i-template">#template</a>
96
98
 
97
99
  </ul>
98
- </nav>
100
+ </div>
99
101
 
100
102
  </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
103
  </nav>
118
104
 
119
- <nav id="classindex-section" class="section project-section">
120
- <h3 class="section-header">Class and Module Index</h3>
105
+ <main role="main" aria-labelledby="class-RubyProf::GraphHtmlPrinter">
106
+ <h1 id="class-RubyProf::GraphHtmlPrinter" class="class">
107
+ class RubyProf::GraphHtmlPrinter
108
+ </h1>
121
109
 
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">
110
+ <section class="description">
178
111
 
179
112
  <p>Generates <a href="../files/examples/graph_html.html">graph</a> profile
180
113
  reports as html. To use the graph html printer:</p>
@@ -195,7 +128,7 @@ reports as html. To use the graph html printer:</p>
195
128
  :template - specify an ERB template to use, instead of the
196
129
  built-in self.template</pre>
197
130
 
198
- </div><!-- description -->
131
+ </section>
199
132
 
200
133
 
201
134
 
@@ -206,24 +139,25 @@ reports as html. To use the graph html printer:</p>
206
139
 
207
140
 
208
141
 
209
- <!-- Constants -->
210
- <section id="constants-list" class="section">
211
- <h3 class="section-header">Constants</h3>
142
+ <section class="constants-list">
143
+ <header>
144
+ <h3>Constants</h3>
145
+ </header>
212
146
  <dl>
213
147
 
214
148
  <dt id="CALL_WIDTH">CALL_WIDTH
215
149
 
216
- <dd class="description">
150
+ <dd>
217
151
 
218
152
 
219
153
  <dt id="PERCENTAGE_WIDTH">PERCENTAGE_WIDTH
220
154
 
221
- <dd class="description">
155
+ <dd>
222
156
 
223
157
 
224
158
  <dt id="TIME_WIDTH">TIME_WIDTH
225
159
 
226
- <dd class="description">
160
+ <dd>
227
161
 
228
162
 
229
163
  </dl>
@@ -232,10 +166,11 @@ reports as html. To use the graph html printer:</p>
232
166
 
233
167
 
234
168
 
235
- <!-- Methods -->
236
169
 
237
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
238
- <h3 class="section-header">Public Instance Methods</h3>
170
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
171
+ <header>
172
+ <h3>Public Instance Methods</h3>
173
+ </header>
239
174
 
240
175
 
241
176
  <div id="method-i-create_link" class="method-detail ">
@@ -243,7 +178,9 @@ reports as html. To use the graph html printer:</p>
243
178
  <div class="method-heading">
244
179
  <span class="method-name">create_link</span><span
245
180
  class="method-args">(thread, overall_time, method)</span>
181
+
246
182
  <span class="method-click-advice">click to toggle source</span>
183
+
247
184
  </div>
248
185
 
249
186
 
@@ -253,12 +190,13 @@ reports as html. To use the graph html printer:</p>
253
190
  which are under the min_perecent specified by the user, since they will not
254
191
  be printed out.</p>
255
192
 
193
+
256
194
 
257
195
 
258
196
  <div class="method-source-code" id="create_link-source">
259
197
  <pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 49</span>
260
198
  <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>)
261
- <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>
199
+ <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>
262
200
  <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>
263
201
  <span class="ruby-comment"># Just return name</span>
264
202
  <span class="ruby-identifier">h</span> <span class="ruby-identifier">method</span>.<span class="ruby-identifier">full_name</span>
@@ -267,14 +205,14 @@ be printed out.</p>
267
205
  <span class="ruby-node">&quot;&lt;a href=\&quot;#{href}\&quot;&gt;#{h method.full_name}&lt;/a&gt;&quot;</span>
268
206
  <span class="ruby-keyword">end</span>
269
207
  <span class="ruby-keyword">end</span></pre>
270
- </div><!-- create_link-source -->
208
+ </div>
271
209
 
272
210
  </div>
273
211
 
274
212
 
275
213
 
276
214
 
277
- </div><!-- create_link-method -->
215
+ </div>
278
216
 
279
217
 
280
218
  <div id="method-i-file_link" class="method-detail ">
@@ -282,7 +220,9 @@ be printed out.</p>
282
220
  <div class="method-heading">
283
221
  <span class="method-name">file_link</span><span
284
222
  class="method-args">(path, linenum)</span>
223
+
285
224
  <span class="method-click-advice">click to toggle source</span>
225
+
286
226
  </div>
287
227
 
288
228
 
@@ -290,30 +230,31 @@ be printed out.</p>
290
230
 
291
231
 
292
232
 
233
+
293
234
 
294
235
 
295
236
  <div class="method-source-code" id="file_link-source">
296
237
  <pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 64</span>
297
238
  <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>)
298
239
  <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>)
299
- <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>
240
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">srcfile</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/\/ruby_runtime$/</span>
300
241
  <span class="ruby-string">&quot;&quot;</span>
301
242
  <span class="ruby-keyword">else</span>
302
- <span class="ruby-keyword">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">%rdarwin/</span>
243
+ <span class="ruby-keyword">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/darwin/</span>
303
244
  <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>
304
245
  <span class="ruby-keyword">else</span>
305
246
  <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>
306
247
  <span class="ruby-keyword">end</span>
307
248
  <span class="ruby-keyword">end</span>
308
249
  <span class="ruby-keyword">end</span></pre>
309
- </div><!-- file_link-source -->
250
+ </div>
310
251
 
311
252
  </div>
312
253
 
313
254
 
314
255
 
315
256
 
316
- </div><!-- file_link-method -->
257
+ </div>
317
258
 
318
259
 
319
260
  <div id="method-i-method_href" class="method-detail ">
@@ -321,7 +262,9 @@ be printed out.</p>
321
262
  <div class="method-heading">
322
263
  <span class="method-name">method_href</span><span
323
264
  class="method-args">(thread, method)</span>
265
+
324
266
  <span class="method-click-advice">click to toggle source</span>
267
+
325
268
  </div>
326
269
 
327
270
 
@@ -329,21 +272,22 @@ be printed out.</p>
329
272
 
330
273
 
331
274
 
275
+
332
276
 
333
277
 
334
278
  <div class="method-source-code" id="method_href-source">
335
279
  <pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 60</span>
336
280
  <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>)
337
- <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">fiber_id</span>.<span class="ruby-identifier">to_s</span>)
281
+ <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>)
338
282
  <span class="ruby-keyword">end</span></pre>
339
- </div><!-- method_href-source -->
283
+ </div>
340
284
 
341
285
  </div>
342
286
 
343
287
 
344
288
 
345
289
 
346
- </div><!-- method_href-method -->
290
+ </div>
347
291
 
348
292
 
349
293
  <div id="method-i-print" class="method-detail ">
@@ -351,7 +295,9 @@ be printed out.</p>
351
295
  <div class="method-heading">
352
296
  <span class="method-name">print</span><span
353
297
  class="method-args">(output = STDOUT, options = {})</span>
298
+
354
299
  <span class="method-click-advice">click to toggle source</span>
300
+
355
301
  </div>
356
302
 
357
303
 
@@ -359,6 +305,7 @@ be printed out.</p>
359
305
 
360
306
 
361
307
 
308
+
362
309
 
363
310
 
364
311
  <div class="method-source-code" id="print-source">
@@ -368,14 +315,14 @@ be printed out.</p>
368
315
  <span class="ruby-identifier">setup_options</span>(<span class="ruby-identifier">options</span>)
369
316
  <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>)
370
317
  <span class="ruby-keyword">end</span></pre>
371
- </div><!-- print-source -->
318
+ </div>
372
319
 
373
320
  </div>
374
321
 
375
322
 
376
323
 
377
324
 
378
- </div><!-- print-method -->
325
+ </div>
379
326
 
380
327
 
381
328
  <div id="method-i-setup_options" class="method-detail ">
@@ -383,7 +330,9 @@ be printed out.</p>
383
330
  <div class="method-heading">
384
331
  <span class="method-name">setup_options</span><span
385
332
  class="method-args">(options)</span>
333
+
386
334
  <span class="method-click-advice">click to toggle source</span>
335
+
387
336
  </div>
388
337
 
389
338
 
@@ -391,6 +340,12 @@ be printed out.</p>
391
340
 
392
341
 
393
342
 
343
+
344
+ <div class="method-calls-super">
345
+ Calls superclass method
346
+ <a href="AbstractPrinter.html#method-i-setup_options">RubyProf::AbstractPrinter#setup_options</a>
347
+ </div>
348
+
394
349
 
395
350
 
396
351
  <div class="method-source-code" id="setup_options-source">
@@ -403,14 +358,14 @@ be printed out.</p>
403
358
  <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>)
404
359
  <span class="ruby-ivar">@erb</span>.<span class="ruby-identifier">filename</span> = <span class="ruby-identifier">filename</span>
405
360
  <span class="ruby-keyword">end</span></pre>
406
- </div><!-- setup_options-source -->
361
+ </div>
407
362
 
408
363
  </div>
409
364
 
410
365
 
411
366
 
412
367
 
413
- </div><!-- setup_options-method -->
368
+ </div>
414
369
 
415
370
 
416
371
  <div id="method-i-template" class="method-detail ">
@@ -418,7 +373,9 @@ be printed out.</p>
418
373
  <div class="method-heading">
419
374
  <span class="method-name">template</span><span
420
375
  class="method-args">()</span>
376
+
421
377
  <span class="method-click-advice">click to toggle source</span>
378
+
422
379
  </div>
423
380
 
424
381
 
@@ -426,6 +383,7 @@ be printed out.</p>
426
383
 
427
384
 
428
385
 
386
+
429
387
 
430
388
 
431
389
  <div class="method-source-code" id="template-source">
@@ -493,16 +451,12 @@ be printed out.</p>
493
451
  &lt;table&gt;
494
452
  &lt;tr&gt;
495
453
  &lt;th&gt;Thread ID&lt;/th&gt;
496
- &lt;% if RUBY_VERSION &gt;= &quot;1.9&quot; %&gt;
497
454
  &lt;th&gt;Fiber ID&lt;/th&gt;
498
- &lt;% end %&gt;
499
455
  &lt;th&gt;Total Time&lt;/th&gt;
500
456
  &lt;/tr&gt;
501
457
  &lt;% for thread in @result.threads %&gt;
502
458
  &lt;tr&gt;
503
- &lt;% if RUBY_VERSION &gt;= &quot;1.9&quot; %&gt;
504
459
  &lt;td&gt;&lt;%= thread.id %&gt;&lt;/td&gt;
505
- &lt;% end %&gt;
506
460
  &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;
507
461
  &lt;td&gt;&lt;%= thread.total_time %&gt;&lt;/td&gt;
508
462
  &lt;/tr&gt;
@@ -513,11 +467,7 @@ be printed out.</p>
513
467
  &lt;% for thread in @result.threads
514
468
  methods = thread.methods
515
469
  total_time = thread.total_time %&gt;
516
- &lt;% if RUBY_VERSION &gt;= &quot;1.9&quot; %&gt;
517
470
  &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;
518
- &lt;% else %&gt;
519
- &lt;h2&gt;&lt;a name=&quot;&lt;%= thread.fiber_id %&gt;&quot;&gt;Thread &lt;%= thread.fiber_id %&gt;&lt;/a&gt;&lt;/h2&gt;
520
- &lt;% end %&gt;
521
471
  &lt;table&gt;
522
472
  &lt;thead&gt;
523
473
  &lt;tr&gt;
@@ -605,26 +555,25 @@ be printed out.</p>
605
555
  &lt;/body&gt;
606
556
  &lt;/html&gt;&#39;</span>
607
557
  <span class="ruby-keyword">end</span></pre>
608
- </div><!-- template-source -->
558
+ </div>
609
559
 
610
560
  </div>
611
561
 
612
562
 
613
563
 
614
564
 
615
- </div><!-- template-method -->
565
+ </div>
616
566
 
617
567
 
618
- </section><!-- public-instance-method-details -->
568
+ </section>
619
569
 
620
- </section><!-- 5Buntitled-5D -->
621
-
622
- </div><!-- documentation -->
570
+ </section>
571
+ </main>
623
572
 
624
573
 
625
- <footer id="validator-badges">
626
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
627
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.1.
628
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
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://rdoc.rubyforge.org">RDoc</a> 4.1.0.
577
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
629
578
  </footer>
630
579