ruby-prof 0.13.1 → 0.14.0
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.
- checksums.yaml +4 -4
- data/CHANGES +14 -0
- data/README.rdoc +1 -1
- data/Rakefile +2 -3
- data/bin/ruby-prof +4 -4
- data/bin/ruby-prof-check-trace +45 -0
- data/doc/LICENSE.html +49 -88
- data/doc/README_rdoc.html +92 -106
- data/doc/Rack.html +47 -116
- data/doc/Rack/RubyProf.html +119 -174
- data/doc/RubyProf.html +184 -216
- data/doc/RubyProf/AbstractPrinter.html +131 -162
- data/doc/RubyProf/AggregateCallInfo.html +136 -166
- data/doc/RubyProf/CallInfo.html +113 -154
- data/doc/RubyProf/CallInfoPrinter.html +56 -123
- data/doc/RubyProf/CallInfoVisitor.html +87 -216
- data/doc/RubyProf/CallStackPrinter.html +222 -215
- data/doc/RubyProf/CallTreePrinter.html +91 -142
- data/doc/RubyProf/Cmd.html +115 -157
- data/doc/RubyProf/DotPrinter.html +88 -140
- data/doc/RubyProf/FlatPrinter.html +66 -129
- data/doc/RubyProf/FlatPrinterWithLineNumbers.html +69 -132
- data/doc/RubyProf/GraphHtmlPrinter.html +115 -166
- data/doc/RubyProf/GraphPrinter.html +58 -125
- data/doc/RubyProf/MethodInfo.html +147 -172
- data/doc/RubyProf/MultiPrinter.html +104 -150
- data/doc/RubyProf/Profile.html +125 -179
- data/doc/RubyProf/ProfileTask.html +117 -157
- data/doc/RubyProf/Test.html +115 -154
- data/doc/RubyProf/Thread.html +87 -147
- data/doc/created.rid +13 -14
- data/doc/examples/flat_txt.html +51 -90
- data/doc/examples/graph_html.html +852 -0
- data/doc/examples/graph_txt.html +64 -92
- data/doc/fonts.css +167 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/index.html +75 -65
- data/doc/js/darkfish.js +0 -15
- data/doc/js/search.js +20 -5
- data/doc/js/search_index.js +1 -1
- data/doc/rdoc.css +255 -218
- data/doc/table_of_contents.html +751 -353
- data/ext/ruby_prof/extconf.rb +20 -22
- data/ext/ruby_prof/rp_measure_allocations.c +9 -5
- data/ext/ruby_prof/rp_measure_gc_runs.c +8 -0
- data/ext/ruby_prof/rp_measure_gc_time.c +5 -2
- data/ext/ruby_prof/rp_measure_wall_time.c +1 -0
- data/ext/ruby_prof/rp_method.c +0 -9
- data/ext/ruby_prof/rp_method.h +1 -6
- data/ext/ruby_prof/ruby_prof.c +32 -112
- data/ext/ruby_prof/ruby_prof.h +9 -10
- data/lib/ruby-prof.rb +2 -1
- data/lib/ruby-prof/aggregate_call_info.rb +4 -6
- data/lib/ruby-prof/call_info_visitor.rb +42 -44
- data/lib/ruby-prof/printers/graph_html_printer.rb +0 -8
- data/lib/ruby-prof/profile.rb +4 -4
- data/lib/ruby-prof/rack.rb +47 -47
- data/lib/ruby-prof/task.rb +0 -0
- data/lib/ruby-prof/thread.rb +22 -22
- data/lib/ruby-prof/version.rb +3 -0
- data/ruby-prof.gemspec +7 -11
- data/test/call_info_test.rb +78 -78
- data/test/call_info_visitor_test.rb +31 -31
- data/test/fiber_test.rb +2 -2
- data/test/measure_gc_runs_test.rb +1 -1
- data/test/measure_process_time_test.rb +7 -6
- data/test/printers_test.rb +4 -8
- data/test/recursive_test.rb +5 -9
- data/test/test_helper.rb +1 -1
- data/test/unique_call_path_test.rb +7 -29
- data/test/yarv_test.rb +55 -0
- metadata +63 -55
- data/ext/ruby_prof/version.h +0 -7
- data/lib/ruby-prof/test.rb +0 -150
- data/test/exec_test.rb +0 -14
- data/test/test_suite.rb +0 -37
data/doc/examples/graph_txt.html
CHANGED
@@ -2,122 +2,95 @@
|
|
2
2
|
|
3
3
|
<html>
|
4
4
|
<head>
|
5
|
-
<meta
|
5
|
+
<meta charset="UTF-8">
|
6
6
|
|
7
7
|
<title>graph - ruby-prof</title>
|
8
8
|
|
9
|
-
<link
|
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
|
16
|
-
<script
|
17
|
-
<script
|
18
|
-
<script
|
19
|
-
<script
|
20
|
-
<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 class="file">
|
24
|
-
<nav
|
25
|
-
<
|
26
|
-
|
27
|
-
|
24
|
+
<body id="top" role="document" class="file">
|
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
|
-
</
|
31
|
-
</
|
32
|
-
|
36
|
+
</div>
|
37
|
+
</div>
|
33
38
|
|
34
|
-
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
35
40
|
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<
|
37
|
-
<input
|
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
|
-
</
|
40
|
-
</form>
|
41
|
-
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
-
</nav>
|
46
|
+
</div>
|
44
47
|
|
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>
|
45
53
|
|
46
|
-
|
47
|
-
<nav id="fileindex-section" class="section project-section">
|
48
|
-
<h3 class="section-header">Pages</h3>
|
54
|
+
</div>
|
49
55
|
|
50
|
-
<ul>
|
51
|
-
|
52
|
-
<li class="file"><a href="../LICENSE.html">LICENSE</a>
|
53
|
-
|
54
|
-
<li class="file"><a href="../README_rdoc.html">README</a>
|
55
|
-
|
56
|
-
<li class="file"><a href="../examples/flat_txt.html">flat</a>
|
57
|
-
|
58
|
-
<li class="file"><a href="../examples/graph_txt.html">graph</a>
|
59
56
|
|
57
|
+
<div class="nav-section">
|
58
|
+
<h3>Table of Contents</h3>
|
59
|
+
|
60
|
+
<ul class="link-list" role="directory">
|
61
|
+
<li><a href="#label-Graph+Profiles">Graph Profiles</a>
|
62
|
+
<li><a href="#label-Overview">Overview</a>
|
63
|
+
<li><a href="#label-Parents">Parents</a>
|
64
|
+
<li><a href="#label-Children">Children</a>
|
60
65
|
</ul>
|
61
|
-
</
|
66
|
+
</div>
|
67
|
+
|
62
68
|
|
63
|
-
|
64
|
-
|
69
|
+
<div id="project-metadata">
|
70
|
+
<div id="fileindex-section" class="nav-section">
|
71
|
+
<h3>Pages</h3>
|
65
72
|
|
66
73
|
<ul class="link-list">
|
67
74
|
|
68
|
-
<li><a href="../
|
69
|
-
|
70
|
-
<li><a href="../RubyProf/AbstractPrinter.html">RubyProf::AbstractPrinter</a>
|
71
|
-
|
72
|
-
<li><a href="../RubyProf/AggregateCallInfo.html">RubyProf::AggregateCallInfo</a>
|
75
|
+
<li><a href="../LICENSE.html">LICENSE</a>
|
73
76
|
|
74
|
-
<li><a href="../
|
77
|
+
<li><a href="../README_rdoc.html">README</a>
|
75
78
|
|
76
|
-
<li><a href="../
|
79
|
+
<li><a href="../examples/flat_txt.html">flat</a>
|
77
80
|
|
78
|
-
<li><a href="../
|
81
|
+
<li><a href="../examples/graph_html.html">graph.html</a>
|
79
82
|
|
80
|
-
<li><a href="../
|
81
|
-
|
82
|
-
<li><a href="../RubyProf/CallTreePrinter.html">RubyProf::CallTreePrinter</a>
|
83
|
-
|
84
|
-
<li><a href="../RubyProf/Cmd.html">RubyProf::Cmd</a>
|
85
|
-
|
86
|
-
<li><a href="../RubyProf/DotPrinter.html">RubyProf::DotPrinter</a>
|
87
|
-
|
88
|
-
<li><a href="../RubyProf/FlatPrinter.html">RubyProf::FlatPrinter</a>
|
89
|
-
|
90
|
-
<li><a href="../RubyProf/FlatPrinterWithLineNumbers.html">RubyProf::FlatPrinterWithLineNumbers</a>
|
91
|
-
|
92
|
-
<li><a href="../RubyProf/GraphHtmlPrinter.html">RubyProf::GraphHtmlPrinter</a>
|
93
|
-
|
94
|
-
<li><a href="../RubyProf/GraphPrinter.html">RubyProf::GraphPrinter</a>
|
95
|
-
|
96
|
-
<li><a href="../RubyProf/MethodInfo.html">RubyProf::MethodInfo</a>
|
97
|
-
|
98
|
-
<li><a href="../RubyProf/MultiPrinter.html">RubyProf::MultiPrinter</a>
|
99
|
-
|
100
|
-
<li><a href="../RubyProf/Profile.html">RubyProf::Profile</a>
|
101
|
-
|
102
|
-
<li><a href="../RubyProf/ProfileTask.html">RubyProf::ProfileTask</a>
|
103
|
-
|
104
|
-
<li><a href="../RubyProf/Test.html">RubyProf::Test</a>
|
105
|
-
|
106
|
-
<li><a href="../RubyProf/Thread.html">RubyProf::Thread</a>
|
107
|
-
|
108
|
-
<li><a href="../Rack.html">Rack</a>
|
109
|
-
|
110
|
-
<li><a href="../Rack/RubyProf.html">Rack::RubyProf</a>
|
83
|
+
<li><a href="../examples/graph_txt.html">graph</a>
|
111
84
|
|
112
85
|
</ul>
|
113
|
-
</
|
86
|
+
</div>
|
114
87
|
|
115
88
|
</div>
|
116
89
|
</nav>
|
117
90
|
|
118
|
-
<
|
119
|
-
|
120
|
-
<h1 id="label-Graph+Profiles">Graph Profiles
|
91
|
+
<main role="main" aria-label="Page examples/graph.txt">
|
92
|
+
|
93
|
+
<h1 id="label-Graph+Profiles">Graph Profiles<span><a href="#label-Graph+Profiles">¶</a> <a href="#documentation">↑</a></span></h1>
|
121
94
|
|
122
95
|
<p>Graph profiles show how long each method runs, which methods call it and
|
123
96
|
which methods it calls.</p>
|
@@ -218,7 +191,7 @@ which methods it calls.</p>
|
|
218
191
|
0.00% 0.00% 0.00 0.00 0.00 500 Kernel.rand
|
219
192
|
0.00 0.00 0.00 1/1 Integer#to_int</pre>
|
220
193
|
|
221
|
-
<h2 id="label-Overview">Overview
|
194
|
+
<h2 id="label-Overview">Overview<span><a href="#label-Overview">¶</a> <a href="#documentation">↑</a></span></h2>
|
222
195
|
|
223
196
|
<p>Dashed lines divide the report into entries, with one entry per method.
|
224
197
|
Entries are sorted by total time which is the time spent in the method
|
@@ -245,7 +218,7 @@ name - The name of the method.</pre>
|
|
245
218
|
</li><li>
|
246
219
|
<p>MyObject#test - An instance method “test” of the class “MyObject”</p>
|
247
220
|
</li><li>
|
248
|
-
<p><Object:MyObject>
|
221
|
+
<p><Object:MyObject>#test - The <> characters indicate a singleton
|
249
222
|
method on a singleton class.</p>
|
250
223
|
</li></ul>
|
251
224
|
|
@@ -253,7 +226,7 @@ method on a singleton class.</p>
|
|
253
226
|
its children. Of that time, 4.06 seconds was spent in Integer#upto itself
|
254
227
|
and 4.66 in its children. Overall, Integer#upto was called 501 times.</p>
|
255
228
|
|
256
|
-
<h2 id="label-Parents">Parents
|
229
|
+
<h2 id="label-Parents">Parents<span><a href="#label-Parents">¶</a> <a href="#documentation">↑</a></span></h2>
|
257
230
|
|
258
231
|
<p>In each entry, the lines above the primary line are the methods that
|
259
232
|
called the current method. If the current method is a root method then no
|
@@ -271,7 +244,7 @@ Object#is_prime and 1 time from find_largest. Of the 8.72 total seconds
|
|
271
244
|
spent in Integer#upto, 6.63 were done for Object#is_prime and 2.09 for
|
272
245
|
Object#find_largest.</p>
|
273
246
|
|
274
|
-
<h2 id="label-Children">Children
|
247
|
+
<h2 id="label-Children">Children<span><a href="#label-Children">¶</a> <a href="#documentation">↑</a></span></h2>
|
275
248
|
|
276
249
|
<p>In each entry, the lines below the primary line are the methods that the
|
277
250
|
current method called. If the current method is a leaf method then no
|
@@ -292,14 +265,13 @@ see the overall time Kernel.sleep took we would have to look up its entry
|
|
292
265
|
in the graph table.</p>
|
293
266
|
|
294
267
|
<p></p>
|
295
|
-
|
296
|
-
</div>
|
268
|
+
</main>
|
297
269
|
|
298
270
|
|
299
271
|
|
300
|
-
<footer id="validator-badges">
|
301
|
-
<p><a href="http://validator.w3.org/check/referer">
|
302
|
-
<p>Generated by <a href="
|
303
|
-
<p>
|
272
|
+
<footer id="validator-badges" role="contentinfo">
|
273
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
274
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
|
275
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
304
276
|
</footer>
|
305
277
|
|
data/doc/fonts.css
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
|
3
|
+
* with Reserved Font Name "Source". All Rights Reserved. Source is a
|
4
|
+
* trademark of Adobe Systems Incorporated in the United States and/or other
|
5
|
+
* countries.
|
6
|
+
*
|
7
|
+
* This Font Software is licensed under the SIL Open Font License, Version
|
8
|
+
* 1.1.
|
9
|
+
*
|
10
|
+
* This license is copied below, and is also available with a FAQ at:
|
11
|
+
* http://scripts.sil.org/OFL
|
12
|
+
*/
|
13
|
+
|
14
|
+
@font-face {
|
15
|
+
font-family: "Source Code Pro";
|
16
|
+
font-style: normal;
|
17
|
+
font-weight: 400;
|
18
|
+
src: local("Source Code Pro"),
|
19
|
+
local("SourceCodePro-Regular"),
|
20
|
+
url("fonts/SourceCodePro-Regular.ttf") format("truetype");
|
21
|
+
}
|
22
|
+
|
23
|
+
@font-face {
|
24
|
+
font-family: "Source Code Pro";
|
25
|
+
font-style: normal;
|
26
|
+
font-weight: 700;
|
27
|
+
src: local("Source Code Pro Bold"),
|
28
|
+
local("SourceCodePro-Bold"),
|
29
|
+
url("fonts/SourceCodePro-Bold.ttf") format("truetype");
|
30
|
+
}
|
31
|
+
|
32
|
+
/*
|
33
|
+
* Copyright (c) 2010, Łukasz Dziedzic (dziedzic@typoland.com),
|
34
|
+
* with Reserved Font Name Lato.
|
35
|
+
*
|
36
|
+
* This Font Software is licensed under the SIL Open Font License, Version
|
37
|
+
* 1.1.
|
38
|
+
*
|
39
|
+
* This license is copied below, and is also available with a FAQ at:
|
40
|
+
* http://scripts.sil.org/OFL
|
41
|
+
*/
|
42
|
+
|
43
|
+
@font-face {
|
44
|
+
font-family: "Lato";
|
45
|
+
font-style: normal;
|
46
|
+
font-weight: 300;
|
47
|
+
src: local("Lato Light"),
|
48
|
+
local("Lato-Light"),
|
49
|
+
url("fonts/Lato-Light.ttf") format("truetype");
|
50
|
+
}
|
51
|
+
|
52
|
+
@font-face {
|
53
|
+
font-family: "Lato";
|
54
|
+
font-style: italic;
|
55
|
+
font-weight: 300;
|
56
|
+
src: local("Lato Light Italic"),
|
57
|
+
local("Lato-LightItalic"),
|
58
|
+
url("fonts/Lato-LightItalic.ttf") format("truetype");
|
59
|
+
}
|
60
|
+
|
61
|
+
@font-face {
|
62
|
+
font-family: "Lato";
|
63
|
+
font-style: normal;
|
64
|
+
font-weight: 700;
|
65
|
+
src: local("Lato Regular"),
|
66
|
+
local("Lato-Regular"),
|
67
|
+
url("fonts/Lato-Regular.ttf") format("truetype");
|
68
|
+
}
|
69
|
+
|
70
|
+
@font-face {
|
71
|
+
font-family: "Lato";
|
72
|
+
font-style: italic;
|
73
|
+
font-weight: 700;
|
74
|
+
src: local("Lato Italic"),
|
75
|
+
local("Lato-Italic"),
|
76
|
+
url("fonts/Lato-RegularItalic.ttf") format("truetype");
|
77
|
+
}
|
78
|
+
|
79
|
+
/*
|
80
|
+
* -----------------------------------------------------------
|
81
|
+
* SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
82
|
+
* -----------------------------------------------------------
|
83
|
+
*
|
84
|
+
* PREAMBLE
|
85
|
+
* The goals of the Open Font License (OFL) are to stimulate worldwide
|
86
|
+
* development of collaborative font projects, to support the font creation
|
87
|
+
* efforts of academic and linguistic communities, and to provide a free and
|
88
|
+
* open framework in which fonts may be shared and improved in partnership
|
89
|
+
* with others.
|
90
|
+
*
|
91
|
+
* The OFL allows the licensed fonts to be used, studied, modified and
|
92
|
+
* redistributed freely as long as they are not sold by themselves. The
|
93
|
+
* fonts, including any derivative works, can be bundled, embedded,
|
94
|
+
* redistributed and/or sold with any software provided that any reserved
|
95
|
+
* names are not used by derivative works. The fonts and derivatives,
|
96
|
+
* however, cannot be released under any other type of license. The
|
97
|
+
* requirement for fonts to remain under this license does not apply
|
98
|
+
* to any document created using the fonts or their derivatives.
|
99
|
+
*
|
100
|
+
* DEFINITIONS
|
101
|
+
* "Font Software" refers to the set of files released by the Copyright
|
102
|
+
* Holder(s) under this license and clearly marked as such. This may
|
103
|
+
* include source files, build scripts and documentation.
|
104
|
+
*
|
105
|
+
* "Reserved Font Name" refers to any names specified as such after the
|
106
|
+
* copyright statement(s).
|
107
|
+
*
|
108
|
+
* "Original Version" refers to the collection of Font Software components as
|
109
|
+
* distributed by the Copyright Holder(s).
|
110
|
+
*
|
111
|
+
* "Modified Version" refers to any derivative made by adding to, deleting,
|
112
|
+
* or substituting -- in part or in whole -- any of the components of the
|
113
|
+
* Original Version, by changing formats or by porting the Font Software to a
|
114
|
+
* new environment.
|
115
|
+
*
|
116
|
+
* "Author" refers to any designer, engineer, programmer, technical
|
117
|
+
* writer or other person who contributed to the Font Software.
|
118
|
+
*
|
119
|
+
* PERMISSION & CONDITIONS
|
120
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
121
|
+
* a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
122
|
+
* redistribute, and sell modified and unmodified copies of the Font
|
123
|
+
* Software, subject to the following conditions:
|
124
|
+
*
|
125
|
+
* 1) Neither the Font Software nor any of its individual components,
|
126
|
+
* in Original or Modified Versions, may be sold by itself.
|
127
|
+
*
|
128
|
+
* 2) Original or Modified Versions of the Font Software may be bundled,
|
129
|
+
* redistributed and/or sold with any software, provided that each copy
|
130
|
+
* contains the above copyright notice and this license. These can be
|
131
|
+
* included either as stand-alone text files, human-readable headers or
|
132
|
+
* in the appropriate machine-readable metadata fields within text or
|
133
|
+
* binary files as long as those fields can be easily viewed by the user.
|
134
|
+
*
|
135
|
+
* 3) No Modified Version of the Font Software may use the Reserved Font
|
136
|
+
* Name(s) unless explicit written permission is granted by the corresponding
|
137
|
+
* Copyright Holder. This restriction only applies to the primary font name as
|
138
|
+
* presented to the users.
|
139
|
+
*
|
140
|
+
* 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
141
|
+
* Software shall not be used to promote, endorse or advertise any
|
142
|
+
* Modified Version, except to acknowledge the contribution(s) of the
|
143
|
+
* Copyright Holder(s) and the Author(s) or with their explicit written
|
144
|
+
* permission.
|
145
|
+
*
|
146
|
+
* 5) The Font Software, modified or unmodified, in part or in whole,
|
147
|
+
* must be distributed entirely under this license, and must not be
|
148
|
+
* distributed under any other license. The requirement for fonts to
|
149
|
+
* remain under this license does not apply to any document created
|
150
|
+
* using the Font Software.
|
151
|
+
*
|
152
|
+
* TERMINATION
|
153
|
+
* This license becomes null and void if any of the above conditions are
|
154
|
+
* not met.
|
155
|
+
*
|
156
|
+
* DISCLAIMER
|
157
|
+
* THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
158
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
159
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
160
|
+
* OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
161
|
+
* COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
162
|
+
* INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
163
|
+
* DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
164
|
+
* FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
165
|
+
* OTHER DEALINGS IN THE FONT SOFTWARE.
|
166
|
+
*/
|
167
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/add.png
CHANGED
File without changes
|
Binary file
|
data/doc/images/delete.png
CHANGED
File without changes
|
data/doc/images/tag_blue.png
CHANGED
File without changes
|
data/doc/index.html
CHANGED
@@ -2,69 +2,84 @@
|
|
2
2
|
|
3
3
|
<html>
|
4
4
|
<head>
|
5
|
-
<meta
|
5
|
+
<meta charset="UTF-8">
|
6
6
|
|
7
7
|
<title>ruby-prof</title>
|
8
8
|
|
9
|
-
<link
|
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
|
16
|
-
<script
|
17
|
-
<script
|
18
|
-
<script
|
19
|
-
<script
|
20
|
-
<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>
|
24
|
-
<nav
|
25
|
-
<
|
26
|
-
|
27
|
-
|
24
|
+
<body id="top" role="document" class="file">
|
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
|
-
</
|
31
|
-
</
|
36
|
+
</div>
|
37
|
+
</div>
|
32
38
|
|
33
39
|
|
34
|
-
|
40
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
35
41
|
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<
|
37
|
-
<input
|
42
|
+
<div id="search-field-wrapper">
|
43
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
44
|
+
aria-autocomplete="list" aria-controls="search-results"
|
45
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
38
46
|
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</
|
40
|
-
</form>
|
47
|
+
</div>
|
41
48
|
|
42
|
-
|
43
|
-
|
49
|
+
<ul id="search-results" aria-label="Search Results"
|
50
|
+
aria-busy="false" aria-expanded="false"
|
51
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
52
|
+
</form>
|
53
|
+
</div>
|
44
54
|
|
55
|
+
</div>
|
45
56
|
|
46
57
|
<div id="project-metadata">
|
47
|
-
<
|
48
|
-
<h3
|
58
|
+
<div id="fileindex-section" class="nav-section">
|
59
|
+
<h3>Pages</h3>
|
49
60
|
|
50
|
-
<ul>
|
61
|
+
<ul class="link-list">
|
51
62
|
|
52
|
-
<li
|
63
|
+
<li><a href="./LICENSE.html">LICENSE</a>
|
53
64
|
|
54
|
-
<li
|
65
|
+
<li><a href="./README_rdoc.html">README</a>
|
55
66
|
|
56
|
-
<li
|
67
|
+
<li><a href="./examples/flat_txt.html">flat</a>
|
57
68
|
|
58
|
-
<li
|
69
|
+
<li><a href="./examples/graph_html.html">graph.html</a>
|
70
|
+
|
71
|
+
<li><a href="./examples/graph_txt.html">graph</a>
|
59
72
|
|
60
73
|
</ul>
|
61
|
-
</
|
74
|
+
</div>
|
62
75
|
|
63
|
-
<
|
64
|
-
<h3
|
76
|
+
<div id="classindex-section" class="nav-section">
|
77
|
+
<h3>Class and Module Index</h3>
|
65
78
|
|
66
79
|
<ul class="link-list">
|
67
80
|
|
81
|
+
<li><a href="./Rack/RubyProf.html">Rack::RubyProf</a>
|
82
|
+
|
68
83
|
<li><a href="./RubyProf.html">RubyProf</a>
|
69
84
|
|
70
85
|
<li><a href="./RubyProf/AbstractPrinter.html">RubyProf::AbstractPrinter</a>
|
@@ -101,29 +116,24 @@
|
|
101
116
|
|
102
117
|
<li><a href="./RubyProf/ProfileTask.html">RubyProf::ProfileTask</a>
|
103
118
|
|
104
|
-
<li><a href="./RubyProf/Test.html">RubyProf::Test</a>
|
105
|
-
|
106
119
|
<li><a href="./RubyProf/Thread.html">RubyProf::Thread</a>
|
107
120
|
|
108
|
-
<li><a href="./Rack.html">Rack</a>
|
109
|
-
|
110
|
-
<li><a href="./Rack/RubyProf.html">Rack::RubyProf</a>
|
111
|
-
|
112
121
|
</ul>
|
113
|
-
</
|
122
|
+
</div>
|
114
123
|
|
115
124
|
</div>
|
116
125
|
</nav>
|
117
126
|
|
118
|
-
<
|
119
|
-
|
120
|
-
|
127
|
+
<main role="main">
|
128
|
+
|
129
|
+
|
130
|
+
<h1 id="label-ruby-prof">ruby-prof<span><a href="#label-ruby-prof">¶</a> <a href="#documentation">↑</a></span></h1>
|
121
131
|
|
122
132
|
<p><a href="https://travis-ci.org/ruby-prof/ruby-prof"><img
|
123
133
|
src="https://travis-ci.org/ruby-prof/ruby-prof.png?branch=master"
|
124
134
|
alt="Build Status" /></a></p>
|
125
135
|
|
126
|
-
<h2 id="label-Overview">Overview
|
136
|
+
<h2 id="label-Overview">Overview<span><a href="#label-Overview">¶</a> <a href="#documentation">↑</a></span></h2>
|
127
137
|
|
128
138
|
<p>ruby-prof is a fast code profiler for Ruby. Its features include:</p>
|
129
139
|
<ul><li>
|
@@ -151,9 +161,9 @@ href="README_rdoc.html">README</a>.</p>
|
|
151
161
|
<p>Threads - supports profiling multiple threads simultaneously</p>
|
152
162
|
</li></ul>
|
153
163
|
|
154
|
-
<h2 id="label-Requirements">Requirements
|
164
|
+
<h2 id="label-Requirements">Requirements<span><a href="#label-Requirements">¶</a> <a href="#documentation">↑</a></span></h2>
|
155
165
|
|
156
|
-
<p>ruby-prof requires Ruby 1.
|
166
|
+
<p>ruby-prof requires Ruby 1.9.3 or higher.</p>
|
157
167
|
|
158
168
|
<p>If you are running Linux or Unix you'll need a C compiler so the
|
159
169
|
extension can be compiled when it is installed.</p>
|
@@ -162,7 +172,7 @@ extension can be compiled when it is installed.</p>
|
|
162
172
|
specific RubyGem which includes an already built extension (see Install
|
163
173
|
section).</p>
|
164
174
|
|
165
|
-
<h2 id="label-Install">Install
|
175
|
+
<h2 id="label-Install">Install<span><a href="#label-Install">¶</a> <a href="#documentation">↑</a></span></h2>
|
166
176
|
|
167
177
|
<p>The easiest way to install ruby-prof is by using Ruby Gems. To install:</p>
|
168
178
|
|
@@ -171,17 +181,17 @@ section).</p>
|
|
171
181
|
<p>If you're on windows then a prebuilt binary gem is available. You may
|
172
182
|
of course compile it yourself via use of devkit on MinGW.</p>
|
173
183
|
|
174
|
-
<h2 id="label-Usage">Usage
|
184
|
+
<h2 id="label-Usage">Usage<span><a href="#label-Usage">¶</a> <a href="#documentation">↑</a></span></h2>
|
175
185
|
|
176
186
|
<p>There are two ways of running ruby-prof, via the command line or via its
|
177
187
|
API.</p>
|
178
188
|
|
179
|
-
<h3 id="label-ruby-prof+executable">ruby-prof executable
|
189
|
+
<h3 id="label-ruby-prof+executable">ruby-prof executable<span><a href="#label-ruby-prof+executable">¶</a> <a href="#documentation">↑</a></span></h3>
|
180
190
|
|
181
191
|
<p>The first is to use ruby-prof to run the Ruby program you want to profile.
|
182
192
|
For more information refer to the documentation of the ruby-prof command.</p>
|
183
193
|
|
184
|
-
<h3 id="label-ruby-prof+API">ruby-prof API
|
194
|
+
<h3 id="label-ruby-prof+API">ruby-prof API<span><a href="#label-ruby-prof+API">¶</a> <a href="#documentation">↑</a></span></h3>
|
185
195
|
|
186
196
|
<p>The second way is to use the ruby-prof API to profile particular segments
|
187
197
|
of code.</p>
|
@@ -246,7 +256,7 @@ yet started. In addition, resume can also take a block:</p>
|
|
246
256
|
<p>With this usage, resume will automatically call pause at the end of the
|
247
257
|
block.</p>
|
248
258
|
|
249
|
-
<h2 id="label-Method+and+Thread+Elimination">Method and Thread Elimination
|
259
|
+
<h2 id="label-Method+and+Thread+Elimination">Method and Thread Elimination<span><a href="#label-Method+and+Thread+Elimination">¶</a> <a href="#documentation">↑</a></span></h2>
|
250
260
|
|
251
261
|
<p>ruby-prof supports eliminating specific methods and threads from profiling
|
252
262
|
results. This is useful for reducing connectivity in the call graph, making
|
@@ -281,7 +291,7 @@ RubyProf.start</pre>
|
|
281
291
|
<p>Note that the excluded threads must be specified <strong>before</strong>
|
282
292
|
profiling.</p>
|
283
293
|
|
284
|
-
<h2 id="label-Benchmarking+full+load+time+including+rubygems+startup+cost+%3D%3D">Benchmarking full load time including rubygems startup cost
|
294
|
+
<h2 id="label-Benchmarking+full+load+time+including+rubygems+startup+cost+%3D%3D">Benchmarking full load time including rubygems startup cost ==<span><a href="#label-Benchmarking+full+load+time+including+rubygems+startup+cost+%3D%3D">¶</a> <a href="#documentation">↑</a></span></h2>
|
285
295
|
|
286
296
|
<p>If you want to get a more accurate measurement of what takes all of a
|
287
297
|
gem's bin/xxx command to load, you may want to also measure
|
@@ -302,7 +312,7 @@ g:192binsome_installed_gem_command</p>
|
|
302
312
|
<p>$ ruby g:/192/lib/ruby/gems/1.9.1/gems/ruby-prof-0.10.2/bin/ruby-prof
|
303
313
|
./some_file_that_does_a_require_rubygems_at_the_beginning.rb</p>
|
304
314
|
|
305
|
-
<h2 id="label-Profiling+Tests">Profiling Tests
|
315
|
+
<h2 id="label-Profiling+Tests">Profiling Tests<span><a href="#label-Profiling+Tests">¶</a> <a href="#documentation">↑</a></span></h2>
|
306
316
|
|
307
317
|
<p>ruby-prof supports profiling tests cases written using Ruby's built-in
|
308
318
|
unit test framework (ie, test derived from Test::Unit::TestCase). To
|
@@ -322,7 +332,7 @@ profiling options, modify your test class's PROFILE_OPTIONS hash table.
|
|
322
332
|
To globally change test profiling options, modify
|
323
333
|
RubyProf::Test::PROFILE_OPTIONS.</p>
|
324
334
|
|
325
|
-
<h2 id="label-Profiling+Rails">Profiling Rails
|
335
|
+
<h2 id="label-Profiling+Rails">Profiling Rails<span><a href="#label-Profiling+Rails">¶</a> <a href="#documentation">↑</a></span></h2>
|
326
336
|
|
327
337
|
<p>To profile a Rails application it is vital to run it using production like
|
328
338
|
settings (cache classes, cache view lookups, etc.). Otherwise, Rail's
|
@@ -360,7 +370,7 @@ be generated for each request. Note that each request will overwrite the
|
|
360
370
|
profiling reports created by the previous request!</p>
|
361
371
|
</li></ol>
|
362
372
|
|
363
|
-
<h2 id="label-Reports">Reports
|
373
|
+
<h2 id="label-Reports">Reports<span><a href="#label-Reports">¶</a> <a href="#documentation">↑</a></span></h2>
|
364
374
|
|
365
375
|
<p>ruby-prof can generate a number of different reports:</p>
|
366
376
|
<ul><li>
|
@@ -416,7 +426,7 @@ href="http://github.com/ruby-prof/ruby-prof/tree/master/examples/multi.stack.htm
|
|
416
426
|
|
417
427
|
<p>There is also a graphviz .dot visualiser.</p>
|
418
428
|
|
419
|
-
<h2 id="label-Printers">Printers
|
429
|
+
<h2 id="label-Printers">Printers<span><a href="#label-Printers">¶</a> <a href="#documentation">↑</a></span></h2>
|
420
430
|
|
421
431
|
<p>Reports are created by printers. Supported printers include:</p>
|
422
432
|
<ul><li>
|
@@ -473,7 +483,7 @@ directory path and a basename for the files it produces.</p>
|
|
473
483
|
<span class="ruby-identifier">printer</span>.<span class="ruby-identifier">print</span>(:<span class="ruby-identifier">path</span> =<span class="ruby-operator">></span> <span class="ruby-string">"."</span>, :<span class="ruby-identifier">profile</span> =<span class="ruby-operator">></span> <span class="ruby-string">"profile"</span>)
|
474
484
|
</pre>
|
475
485
|
|
476
|
-
<h2 id="label-Measurements">Measurements
|
486
|
+
<h2 id="label-Measurements">Measurements<span><a href="#label-Measurements">¶</a> <a href="#documentation">↑</a></span></h2>
|
477
487
|
|
478
488
|
<p>Depending on the mode and platform, ruby-prof can measure various aspects
|
479
489
|
of a Ruby program. Supported measurements include:</p>
|
@@ -604,7 +614,7 @@ variable:</p>
|
|
604
614
|
|
605
615
|
<pre>RubyProf.cpu_frequency = <value></pre>
|
606
616
|
|
607
|
-
<h2 id="label-Multi-threaded+Applications">Multi-threaded Applications
|
617
|
+
<h2 id="label-Multi-threaded+Applications">Multi-threaded Applications<span><a href="#label-Multi-threaded+Applications">¶</a> <a href="#documentation">↑</a></span></h2>
|
608
618
|
|
609
619
|
<p>Unfortunately, Ruby does not provide an internal api for detecting thread
|
610
620
|
context switches in 1.8. As a result, the timings ruby-prof reports for
|
@@ -615,7 +625,7 @@ the 2 seconds will be assigned to the foreground thread and not the newly
|
|
615
625
|
created background thread. These errors can largely be avoided if the
|
616
626
|
background thread performs any operation before going to sleep.</p>
|
617
627
|
|
618
|
-
<h2 id="label-Performance">Performance
|
628
|
+
<h2 id="label-Performance">Performance<span><a href="#label-Performance">¶</a> <a href="#documentation">↑</a></span></h2>
|
619
629
|
|
620
630
|
<p>Significant effort has been put into reducing ruby-prof's overhead as
|
621
631
|
much as possible. Our tests show that the overhead associated with
|
@@ -623,11 +633,11 @@ profiling code varies considerably with the code being profiled. Most
|
|
623
633
|
programs will run approximately twice as slow while highly recursive
|
624
634
|
programs (like the fibonacci series test) will run three times slower.</p>
|
625
635
|
|
626
|
-
<h2 id="label-License">License
|
636
|
+
<h2 id="label-License">License<span><a href="#label-License">¶</a> <a href="#documentation">↑</a></span></h2>
|
627
637
|
|
628
638
|
<p>See <a href="LICENSE.html">LICENSE</a> for license information.</p>
|
629
639
|
|
630
|
-
<h2 id="label-Development">Development
|
640
|
+
<h2 id="label-Development">Development<span><a href="#label-Development">¶</a> <a href="#documentation">↑</a></span></h2>
|
631
641
|
|
632
642
|
<p>Code is located at <a
|
633
643
|
href="https://github.com/ruby-prof/ruby-prof">github.com/ruby-prof/ruby-prof</a></p>
|
@@ -635,13 +645,13 @@ href="https://github.com/ruby-prof/ruby-prof">github.com/ruby-prof/ruby-prof</a>
|
|
635
645
|
<p>Google group/mailing list: <a
|
636
646
|
href="http://groups.google.com/group/ruby-optimization">groups.google.com/group/ruby-optimization</a>
|
637
647
|
or start a github issue.</p>
|
648
|
+
</main>
|
638
649
|
|
639
|
-
</div>
|
640
650
|
|
641
651
|
|
642
|
-
<footer id="validator-badges">
|
643
|
-
<p><a href="http://validator.w3.org/check/referer">
|
644
|
-
<p>Generated by <a href="
|
645
|
-
<p>
|
652
|
+
<footer id="validator-badges" role="contentinfo">
|
653
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
654
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
|
655
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
646
656
|
</footer>
|
647
657
|
|