doc/index.html in ruby-prof-0.16.2 vs doc/index.html in ruby-prof-0.17.0
- old
+ new
@@ -6,10 +6,11 @@
<title>ruby-prof</title>
<script type="text/javascript">
var rdoc_rel_prefix = "./";
+ var index_rel_prefix = "./";
</script>
<script src="./js/jquery.js"></script>
<script src="./js/darkfish.js"></script>
@@ -77,10 +78,12 @@
<li><a href="./Rack.html">Rack</a>
<li><a href="./Rack/RubyProf.html">Rack::RubyProf</a>
+ <li><a href="./Rack/RubyProf/RackProfiler.html">Rack::RubyProf::RackProfiler</a>
+
<li><a href="./RubyProf.html">RubyProf</a>
<li><a href="./RubyProf/AbstractPrinter.html">RubyProf::AbstractPrinter</a>
<li><a href="./RubyProf/AggregateCallInfo.html">RubyProf::AggregateCallInfo</a>
@@ -95,10 +98,12 @@
<li><a href="./RubyProf/CallTreePrinter.html">RubyProf::CallTreePrinter</a>
<li><a href="./RubyProf/Cmd.html">RubyProf::Cmd</a>
+ <li><a href="./RubyProf/DeprecationWarnings.html">RubyProf::DeprecationWarnings</a>
+
<li><a href="./RubyProf/DotPrinter.html">RubyProf::DotPrinter</a>
<li><a href="./RubyProf/FlatPrinter.html">RubyProf::FlatPrinter</a>
<li><a href="./RubyProf/FlatPrinterWithLineNumbers.html">RubyProf::FlatPrinterWithLineNumbers</a>
@@ -111,10 +116,14 @@
<li><a href="./RubyProf/MultiPrinter.html">RubyProf::MultiPrinter</a>
<li><a href="./RubyProf/Profile.html">RubyProf::Profile</a>
+ <li><a href="./RubyProf/Profile/ExcludeCommonMethods.html">RubyProf::Profile::ExcludeCommonMethods</a>
+
+ <li><a href="./RubyProf/Profile/LegacyMethodElimination.html">RubyProf::Profile::LegacyMethodElimination</a>
+
<li><a href="./RubyProf/ProfileTask.html">RubyProf::ProfileTask</a>
<li><a href="./RubyProf/Thread.html">RubyProf::Thread</a>
</ul>
@@ -190,11 +199,12 @@
via its convenience API or via its core API.</p>
<h3 id="label-ruby-prof+Executable">ruby-prof Executable<span><a href="#label-ruby-prof+Executable">¶</a> <a href="#top">↑</a></span></h3>
<p>The first is to use ruby-prof to run the Ruby program you want to profile.
-For more information refer to the documentation of the ruby-prof command.</p>
+For more information refer to the documentation of the ruby-prof command:
+`$ ruby-prof -h.`</p>
<h3 id="label-ruby-prof+Convenience+API">ruby-prof Convenience API<span><a href="#label-ruby-prof+Convenience+API">¶</a> <a href="#top">↑</a></span></h3>
<p>The second way is to use the ruby-prof convenience API to profile
particular segments of code.</p>
@@ -294,17 +304,17 @@
<dd>
<p>Resume profiling</p>
</dd><dt><a href="RubyProf/Profile.html#method-i-stop">RubyProf::Profile#stop</a>
<dd>
<p>Stop profiling and return self</p>
-</dd><dt>RubyProf::Profile#profile
+</dd><dt><a href="RubyProf/Profile.html#method-i-profile">RubyProf::Profile#profile</a>
<dd>
<p>Perform a profile run and return result. Accepts the same arguments as <a
href="RubyProf/Profile.html#method-c-new">RubyProf::Profile.new</a>.</p>
</dd></dl>
-<h2 id="label-Method+Elimination">Method Elimination<span><a href="#label-Method+Elimination">¶</a> <a href="#top">↑</a></span></h2>
+<h2 id="label-Method+Elimination+-28Deprecated-29">Method Elimination (Deprecated)<span><a href="#label-Method+Elimination+-28Deprecated-29">¶</a> <a href="#top">↑</a></span></h2>
<p>ruby-prof supports eliminating specific methods and threads from profiling
results. This is useful for reducing connectivity in the call graph, making
it easier to identify the source of performance problems when using a graph
printer.</p>
@@ -327,10 +337,30 @@
expressions (line separated text).</p>
<p>After eliminating methods the resulting profile will appear exactly as if
those methods had been inlined at their call sites.</p>
+<h2 id="label-Method+Exclusion">Method Exclusion<span><a href="#label-Method+Exclusion">¶</a> <a href="#top">↑</a></span></h2>
+
+<p>ruby-prof supports exluding methods from profiling. The effect on collected
+metrics are identical to eliminating methods from the profiling result in a
+prost process step. The interface is slightly different though:</p>
+
+<pre>profile = RubyProf.new(...)
+profile.exclude_methods!(Integer, :times, ...)
+profile.start</pre>
+
+<p>A convenience method is provided to exclude a large number of methods which
+usually clutter up profiles:</p>
+
+<pre class="ruby"><span class="ruby-identifier">profile</span>.<span class="ruby-identifier">exclude_common_methods!</span>
+</pre>
+
+<p>However, this is a somewhat opinionated method collection. It's usually
+better to view it as an inspiration instead of using it directly (see <a
+href="https://github.com/ruby-prof/ruby-prof/blob/e087b7d7ca11eecf1717d95a5c5fea1e36ea3136/lib/ruby-prof/profile/exclude_common_methods.rb">github.com/ruby-prof/ruby-prof/blob/e087b7d7ca11eecf1717d95a5c5fea1e36ea3136/lib/ruby-prof/profile/exclude_common_methods.rb</a>).</p>
+
<h2 id="label-Profiling+Rails">Profiling Rails<span><a href="#label-Profiling+Rails">¶</a> <a href="#top">↑</a></span></h2>
<p>To profile a Rails application it is vital to run it using production like
settings (cache classes, cache view lookups, etc.). Otherwise, Rail's
dependency loading code will overwhelm any time spent in the application
@@ -452,11 +482,11 @@
</dd><dt><a href="RubyProf/MultiPrinter.html">RubyProf::MultiPrinter</a>
<dd>
<p>Uses the other printers to create several reports in one profiling run</p>
</dd></dl>
-<p>To use a printer:</p>
+<p>Most printers are used in the following way:</p>
<pre class="ruby"><span class="ruby-identifier">result</span> = <span class="ruby-constant">RubyProf</span>.<span class="ruby-identifier">stop</span>
<span class="ruby-identifier">printer</span> = <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">GraphPrinter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">result</span>)
<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">></span> <span class="ruby-value">2</span>)
</pre>
@@ -468,17 +498,20 @@
the different printers.</p>
<p>The other option is <code>:print_file => true</code> (default false),
which adds the filename to the output (GraphPrinter only).</p>
-<p><code>MultiPrinter</code> differs from the other printers in that it
-requires a directory path and a basename for the files it produces.</p>
+<p><code>MultiPrinter</code> and <code>CallTreePrinter</code>differ from the
+other printers in that they require a directory path and a profile basename
+for the files they produce:</p>
<pre class="ruby"><span class="ruby-identifier">printer</span> = <span class="ruby-constant">RubyProf</span><span class="ruby-operator">::</span><span class="ruby-constant">MultiPrinter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">result</span>)
<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>)
</pre>
+<p>The values given in the example above are the defaults.</p>
+
<h2 id="label-Measurements">Measurements<span><a href="#label-Measurements">¶</a> <a href="#top">↑</a></span></h2>
<p>Depending on the mode and platform, ruby-prof can measure various aspects
of a Ruby program. Supported measurements include:</p>
<dl class="rdoc-list note-list"><dt>RubyProf::WALL_TIME
@@ -591,10 +624,17 @@
much as possible. Our tests show that the overhead associated with
profiling code varies considerably with the code being profiled. Most
programs will run approximately twice as slow while highly recursive
programs (like the fibonacci series test) will run three times slower.</p>
+<h2 id="label-Editing+links">Editing links<span><a href="#label-Editing+links">¶</a> <a href="#top">↑</a></span></h2>
+
+<p>Use <code>RUBY_PROF_EDITOR_URI</code> environment variable to open source
+code files in your favorite text editor. For example,
+<code>RUBY_PROF_EDITOR_URI=atm</code> will produce links for Atom text
+editor.</p>
+
<h2 id="label-License">License<span><a href="#label-License">¶</a> <a href="#top">↑</a></span></h2>
<p>See <a href="LICENSE.html">LICENSE</a> for license information.</p>
<h2 id="label-API+Documentation">API Documentation<span><a href="#label-API+Documentation">¶</a> <a href="#top">↑</a></span></h2>
@@ -618,9 +658,9 @@
<footer id="validator-badges" role="contentinfo">
<p><a href="http://validator.w3.org/check/referer">Validate</a>
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.2.
+ <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>