doc/RubyProf/GraphHtmlPrinter.html in ruby-prof-0.15.2 vs doc/RubyProf/GraphHtmlPrinter.html in ruby-prof-0.15.3
- old
+ new
@@ -4,25 +4,22 @@
<head>
<meta charset="UTF-8">
<title>class RubyProf::GraphHtmlPrinter - ruby-prof</title>
-<link href="../fonts.css" rel="stylesheet">
-<link href="../rdoc.css" rel="stylesheet">
-
<script type="text/javascript">
var rdoc_rel_prefix = "../";
</script>
<script src="../js/jquery.js"></script>
-<script src="../js/navigation.js"></script>
-<script src="../js/search_index.js"></script>
-<script src="../js/search.js"></script>
-<script src="../js/searcher.js"></script>
<script src="../js/darkfish.js"></script>
+<link href="../css/fonts.css" rel="stylesheet">
+<link href="../css/rdoc.css" rel="stylesheet">
+
+
<body id="top" role="document" class="class">
<nav role="navigation">
<div id="project-navigation">
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
<h2>
@@ -110,17 +107,16 @@
<section class="description">
<p>Generates <a href="../files/examples/graph_html.html">graph</a> profile
reports as html. To use the graph html printer:</p>
-<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>
- [<span class="ruby-identifier">code</span> <span class="ruby-identifier">to</span> <span class="ruby-identifier">profile</span>]
-<span class="ruby-keyword">end</span>
+<pre>result = RubyProf.profile do
+ [code to profile]
+end
-<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>)
-<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">0</span>)
-</pre>
+printer = RubyProf::GraphHtmlPrinter.new(result)
+printer.print(STDOUT, :min_percent=>0)</pre>
<p>The Graph printer takes the following options in its print methods:</p>
<pre>:filename - specify a file to use that contains the ERB
template to use, instead of the built-in self.template
@@ -199,11 +195,11 @@
<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>
<span class="ruby-keyword">if</span> <span class="ruby-identifier">total_percent</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">min_percent</span>
<span class="ruby-comment"># Just return name</span>
<span class="ruby-identifier">h</span> <span class="ruby-identifier">method</span>.<span class="ruby-identifier">full_name</span>
<span class="ruby-keyword">else</span>
- <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>)
+ <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>)
<span class="ruby-node">"<a href=\"#{href}\">#{h method.full_name}</a>"</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -387,11 +383,11 @@
<div class="method-source-code" id="template-source">
<pre><span class="ruby-comment"># File lib/ruby-prof/printers/graph_html_printer.rb, line 77</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">template</span>
-<span class="ruby-string">'
+<span class="ruby-string">'
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style media="all" type="text/css">
table {
@@ -551,11 +547,11 @@
</tr>
</tfoot>
</table>
<% end %>
</body>
-</html>'</span>
+</html>'</span>
<span class="ruby-keyword">end</span></pre>
</div>
</div>
@@ -571,9 +567,9 @@
</main>
<footer id="validator-badges" role="contentinfo">
<p><a href="http://validator.w3.org/check/referer">Validate</a>
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
+ <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>