doc/RubyProf/MethodInfo.html in ruby-prof-0.16.2 vs doc/RubyProf/MethodInfo.html in ruby-prof-0.17.0

- old
+ new

@@ -6,10 +6,11 @@ <title>class RubyProf::MethodInfo - 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> @@ -91,20 +92,16 @@ <li ><a href="#method-i-children">#children</a> <li ><a href="#method-i-children_time">#children_time</a> - <li ><a href="#method-i-detect_recursion">#detect_recursion</a> - <li ><a href="#method-i-eliminate-21">#eliminate!</a> <li ><a href="#method-i-min_depth">#min_depth</a> <li ><a href="#method-i-parents">#parents</a> - <li ><a href="#method-i-recursive-3F">#recursive?</a> - <li ><a href="#method-i-root-3F">#root?</a> <li ><a href="#method-i-self_time">#self_time</a> <li ><a href="#method-i-to_s">#to_s</a> @@ -207,11 +204,11 @@ <div class="method-source-code" id="aggregate_children-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 104</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 96</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">aggregate_children</span> <span class="ruby-comment"># group call infos based on their targets</span> <span class="ruby-identifier">groups</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">each_with_object</span>({}) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span>, <span class="ruby-identifier">hash</span><span class="ruby-operator">|</span> <span class="ruby-identifier">key</span> = <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">target</span> (<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">||=</span> []) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">call_info</span> @@ -248,11 +245,11 @@ <div class="method-source-code" id="aggregate_parents-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 92</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 84</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">aggregate_parents</span> <span class="ruby-comment"># group call infos based on their parents</span> <span class="ruby-identifier">groups</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">each_with_object</span>({}) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span>, <span class="ruby-identifier">hash</span><span class="ruby-operator">|</span> <span class="ruby-identifier">key</span> = <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">parent</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">parent</span>.<span class="ruby-identifier">target</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">self</span> (<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">||=</span> []) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">call_info</span> @@ -289,11 +286,11 @@ <div class="method-source-code" id="called-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 24</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 20</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">called</span> <span class="ruby-ivar">@called</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sum</span>, <span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span> <span class="ruby-identifier">sum</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">called</span> <span class="ruby-keyword">end</span> @@ -326,11 +323,11 @@ <div class="method-source-code" id="children-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 84</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 76</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">children</span> <span class="ruby-ivar">@children</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:children</span>).<span class="ruby-identifier">flatten</span> <span class="ruby-keyword">end</span></pre> </div> @@ -359,15 +356,15 @@ <div class="method-source-code" id="children_time-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 59</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 55</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">children_time</span> <span class="ruby-ivar">@children_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sum</span>, <span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">children_time</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive</span> + <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">children_time</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive?</span> <span class="ruby-identifier">sum</span> <span class="ruby-keyword">end</span> <span class="ruby-keyword">end</span> <span class="ruby-keyword">end</span></pre> </div> @@ -378,43 +375,10 @@ </div> - <div id="method-i-detect_recursion" class="method-detail "> - - <div class="method-heading"> - <span class="method-name">detect_recursion</span><span - class="method-args">()</span> - - <span class="method-click-advice">click to toggle source</span> - - </div> - - - <div class="method-description"> - - - - - - - <div class="method-source-code" id="detect_recursion-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 20</span> -<span class="ruby-keyword">def</span> <span class="ruby-identifier">detect_recursion</span> - <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:detect_recursion</span>) -<span class="ruby-keyword">end</span></pre> - </div> - - </div> - - - - - </div> - - <div id="method-i-eliminate-21" class="method-detail "> <div class="method-heading"> <span class="method-name">eliminate!</span><span class="method-args">()</span> @@ -430,11 +394,11 @@ <div class="method-source-code" id="eliminate-21-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 121</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 113</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">eliminate!</span> <span class="ruby-comment"># $stderr.puts &quot;eliminating #{self}&quot;</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">eliminate!</span> } <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">clear</span> <span class="ruby-keyword">end</span></pre> @@ -465,11 +429,11 @@ <div class="method-source-code" id="min_depth-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 68</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 64</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">min_depth</span> <span class="ruby-ivar">@min_depth</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:depth</span>).<span class="ruby-identifier">min</span> <span class="ruby-keyword">end</span></pre> </div> @@ -498,11 +462,11 @@ <div class="method-source-code" id="parents-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 88</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 80</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">parents</span> <span class="ruby-ivar">@parents</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:parent</span>) <span class="ruby-keyword">end</span></pre> </div> @@ -512,43 +476,10 @@ </div> - <div id="method-i-recursive-3F" class="method-detail "> - - <div class="method-heading"> - <span class="method-name">recursive?</span><span - class="method-args">()</span> - - <span class="method-click-advice">click to toggle source</span> - - </div> - - - <div class="method-description"> - - - - - - - <div class="method-source-code" id="recursive-3F-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 80</span> -<span class="ruby-keyword">def</span> <span class="ruby-identifier">recursive?</span> - (<span class="ruby-ivar">@recursive</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">detect</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:recursive</span>) <span class="ruby-operator">?</span> <span class="ruby-value">:true</span> <span class="ruby-operator">:</span> <span class="ruby-value">:false</span>) <span class="ruby-operator">==</span> <span class="ruby-value">:true</span> -<span class="ruby-keyword">end</span></pre> - </div> - - </div> - - - - - </div> - - <div id="method-i-root-3F" class="method-detail "> <div class="method-heading"> <span class="method-name">root?</span><span class="method-args">()</span> @@ -564,11 +495,11 @@ <div class="method-source-code" id="root-3F-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 72</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 68</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">root?</span> <span class="ruby-ivar">@root</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">find</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">root?</span> <span class="ruby-keyword">end</span>.<span class="ruby-identifier">nil?</span> @@ -601,15 +532,15 @@ <div class="method-source-code" id="self_time-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 41</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 37</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">self_time</span> <span class="ruby-ivar">@self_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sum</span>, <span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">self_time</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive</span> + <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">self_time</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive?</span> <span class="ruby-identifier">sum</span> <span class="ruby-keyword">end</span> <span class="ruby-keyword">end</span> <span class="ruby-keyword">end</span></pre> </div> @@ -639,11 +570,11 @@ <div class="method-source-code" id="to_s-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 116</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 108</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span> <span class="ruby-node">&quot;#{self.full_name} (c: #{self.called}, tt: #{self.total_time}, st: #{self.self_time}, wt: #{wait_time}, ct: #{self.children_time})&quot;</span> <span class="ruby-keyword">end</span></pre> </div> @@ -672,15 +603,15 @@ <div class="method-source-code" id="total_time-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 32</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 28</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">total_time</span> <span class="ruby-ivar">@total_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sum</span>, <span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">total_time</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive</span> + <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">total_time</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive?</span> <span class="ruby-identifier">sum</span> <span class="ruby-keyword">end</span> <span class="ruby-keyword">end</span> <span class="ruby-keyword">end</span></pre> </div> @@ -710,15 +641,15 @@ <div class="method-source-code" id="wait_time-source"> - <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 50</span> + <pre><span class="ruby-comment"># File lib/ruby-prof/method_info.rb, line 46</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier">wait_time</span> <span class="ruby-ivar">@wait_time</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span> <span class="ruby-identifier">call_infos</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sum</span>, <span class="ruby-identifier">call_info</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">wait_time</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive</span> + <span class="ruby-identifier">sum</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">wait_time</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">call_info</span>.<span class="ruby-identifier">recursive?</span> <span class="ruby-identifier">sum</span> <span class="ruby-keyword">end</span> <span class="ruby-keyword">end</span> <span class="ruby-keyword">end</span></pre> </div> @@ -737,9 +668,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://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>