doc/rdoc/classes/RFuzz/Session.src/M000037.html in rfuzz-0.8 vs doc/rdoc/classes/RFuzz/Session.src/M000037.html in rfuzz-0.9

- old
+ new

@@ -3,32 +3,16 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>run (RFuzz::Session)</title> + <title>cur_count (RFuzz::Session)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> - <pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 61</span> -61: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">count</span>=<span class="ruby-value">1</span>, <span class="ruby-identifier">options</span>={}) -62: <span class="ruby-identifier">sample</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:sample</span>] <span class="ruby-operator">||</span> [<span class="ruby-identifier">:request</span>] -63: <span class="ruby-identifier">count</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> -64: <span class="ruby-comment cmt"># setup for this latest sample run</span> -65: <span class="ruby-ivar">@runs</span> <span class="ruby-operator">&lt;&lt;</span> {} -66: <span class="ruby-ivar">@counts</span> <span class="ruby-operator">&lt;&lt;</span> {} -67: <span class="ruby-ivar">@tracking</span> <span class="ruby-operator">&lt;&lt;</span> {} -68: <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@client</span>, <span class="ruby-ivar">@rand</span> -69: -70: <span class="ruby-comment cmt"># record the request stats then reset them</span> -71: <span class="ruby-identifier">sample</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">cur_run</span>[<span class="ruby-identifier">s</span>] = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">notifier</span>.<span class="ruby-identifier">stats</span>[<span class="ruby-identifier">s</span>].<span class="ruby-identifier">clone</span> } -72: <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">notifier</span>.<span class="ruby-identifier">reset</span> -73: <span class="ruby-keyword kw">end</span> -74: -75: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:save_as</span>] -76: <span class="ruby-identifier">write_runs</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:save_as</span>][<span class="ruby-value">0</span>]) -77: <span class="ruby-identifier">write_counts</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:save_as</span>][<span class="ruby-value">1</span>]) -78: <span class="ruby-keyword kw">end</span> -79: <span class="ruby-keyword kw">end</span></pre> + <pre> <span class="ruby-comment cmt"># File lib/rfuzz/session.rb, line 49</span> +49: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cur_count</span> +50: <span class="ruby-ivar">@counts</span>.<span class="ruby-identifier">last</span> +51: <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file