doc/BigBench.html in bigbench-0.0.1 vs doc/BigBench.html in bigbench-0.0.2
- old
+ new
@@ -45,10 +45,11 @@
<div id="file-metadata">
<nav id="file-list-section" class="section">
<h3 class="section-header">Defined In</h3>
<ul>
+ <li>lib/bigbench/benchmark/looper.rb
<li>lib/bigbench/benchmark.rb
<li>lib/bigbench/bot.rb
<li>lib/bigbench/configuration.rb
<li>lib/bigbench/executor.rb
<li>lib/bigbench/fragment.rb
@@ -124,10 +125,12 @@
<li><a href="./BigBench/Benchmark.html">BigBench::Benchmark</a>
<li><a href="./BigBench/Benchmark/Benchmark.html">BigBench::Benchmark::Benchmark</a>
+ <li><a href="./BigBench/Benchmark/Looper.html">BigBench::Benchmark::Looper</a>
+
<li><a href="./BigBench/Bot.html">BigBench::Bot</a>
<li><a href="./BigBench/Configuration.html">BigBench::Configuration</a>
<li><a href="./BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
@@ -152,18 +155,18 @@
<li><a href="./BigBench/Tracker.html">BigBench::Tracker</a>
<li><a href="./BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
+ <li><a href="./EventMachineLoop.html">EventMachineLoop</a>
+
<li><a href="./Float.html">Float</a>
<li><a href="./Helpers.html">Helpers</a>
<li><a href="./Object.html">Object</a>
- <li><a href="./TestWebServer.html">TestWebServer</a>
-
</ul>
</nav>
</div>
</nav>
@@ -221,22 +224,23 @@
<pre class="ruby"><span class="ruby-identifier">benchmark</span> <span class="ruby-string">"default website pages"</span> =<span class="ruby-operator">></span> <span class="ruby-string">"http://localhost:3000"</span> <span class="ruby-keyword">do</span>
<span class="ruby-identifier">get</span> <span class="ruby-string">"/"</span>
<span class="ruby-identifier">get</span> <span class="ruby-string">"/blog"</span>
<span class="ruby-identifier">get</span> <span class="ruby-string">"/imprint"</span>
+ <span class="ruby-identifier">get</span> <span class="ruby-string">"/admin"</span>, :<span class="ruby-identifier">basic_auth</span> =<span class="ruby-operator">></span> [<span class="ruby-string">'admin'</span>, <span class="ruby-string">'secret'</span>]
<span class="ruby-keyword">end</span>
<span class="ruby-identifier">benchmark</span> <span class="ruby-string">"login and logout"</span> =<span class="ruby-operator">></span> <span class="ruby-string">"http://localhost:3000"</span> <span class="ruby-keyword">do</span>
- <span class="ruby-identifier">post</span> <span class="ruby-string">"/login"</span>, { :<span class="ruby-identifier">name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"test@user.com"</span>, :<span class="ruby-identifier">password</span> =<span class="ruby-operator">></span> <span class="ruby-string">"secret"</span> }
- <span class="ruby-identifier">post</span> <span class="ruby-string">"http://localhost:3000/logout"</span>
+ <span class="ruby-identifier">post</span> <span class="ruby-string">"/login"</span>, :<span class="ruby-identifier">params</span> =<span class="ruby-operator">></span> { :<span class="ruby-identifier">name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"test@user.com"</span>, :<span class="ruby-identifier">password</span> =<span class="ruby-operator">></span> <span class="ruby-string">"secret"</span> }
+ <span class="ruby-identifier">post</span> <span class="ruby-string">"/logout"</span>, :<span class="ruby-identifier">params</span> =<span class="ruby-operator">></span> { :<span class="ruby-identifier">name</span> =<span class="ruby-operator">></span> <span class="ruby-string">"test@user.com"</span> }
<span class="ruby-keyword">end</span>
</pre>
<div class="method-source-code" id="benchmark-source">
- <pre><span class="ruby-comment"># File lib/bigbench/benchmark.rb, line 111</span>
+ <pre><span class="ruby-comment"># File lib/bigbench/benchmark.rb, line 101</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">benchmark</span>(<span class="ruby-identifier">options</span>)
<span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">block_given?</span>
<span class="ruby-constant">Benchmark</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">options</span>, &<span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- benchmark-source -->
@@ -263,11 +267,11 @@
<p>List all available benchmarks</p>
<div class="method-source-code" id="benchmarks-source">
- <pre><span class="ruby-comment"># File lib/bigbench/benchmark.rb, line 117</span>
+ <pre><span class="ruby-comment"># File lib/bigbench/benchmark.rb, line 107</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">benchmarks</span>
<span class="ruby-constant">Benchmark</span>.<span class="ruby-identifier">all</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- benchmarks-source -->
@@ -294,11 +298,11 @@
<code>InvalidOptions</code> exception if not</p>
<div class="method-source-code" id="check_config-21-source">
- <pre><span class="ruby-comment"># File lib/bigbench/configuration.rb, line 104</span>
+ <pre><span class="ruby-comment"># File lib/bigbench/configuration.rb, line 111</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">check_config!</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Configuration</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidOptions</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">valid?</span>
<span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- check_config-21-source -->
@@ -329,11 +333,11 @@
</pre>
<div class="method-source-code" id="config-source">
- <pre><span class="ruby-comment"># File lib/bigbench/configuration.rb, line 99</span>
+ <pre><span class="ruby-comment"># File lib/bigbench/configuration.rb, line 106</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">config</span>
<span class="ruby-constant">Configuration</span>.<span class="ruby-identifier">config</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- config-source -->
@@ -357,23 +361,24 @@
<div class="method-description">
<p>Configure the benchmark by supplying a hash of options like this:</p>
<pre class="ruby"><span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">configure</span> = {
- :<span class="ruby-identifier">duration</span> =<span class="ruby-operator">></span> <span class="ruby-value">10</span>.<span class="ruby-identifier">seconds</span>,
- :<span class="ruby-identifier">output</span> =<span class="ruby-operator">></span> <span class="ruby-string">"test.ljson"</span>,
- :<span class="ruby-identifier">threads</span> =<span class="ruby-operator">></span> <span class="ruby-value">20</span>
+ :<span class="ruby-identifier">duration</span> =<span class="ruby-operator">></span> <span class="ruby-value">10</span>.<span class="ruby-identifier">seconds</span>,
+ :<span class="ruby-identifier">output</span> =<span class="ruby-operator">></span> <span class="ruby-string">"test.ljson"</span>,
+ :<span class="ruby-identifier">users</span> =<span class="ruby-operator">></span> <span class="ruby-value">20</span>,
+ :<span class="ruby-identifier">basic_auth</span> =<span class="ruby-operator">></span> [<span class="ruby-string">'username'</span>, <span class="ruby-string">'secret'</span>]
}
</pre>
<p>Those values can then be set and retreived with
<code>BigBench.config.duration</code>, …</p>
<div class="method-source-code" id="configure-3D-source">
- <pre><span class="ruby-comment"># File lib/bigbench/configuration.rb, line 90</span>
+ <pre><span class="ruby-comment"># File lib/bigbench/configuration.rb, line 97</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">configure=</span>(<span class="ruby-identifier">config</span>)
<span class="ruby-constant">Configuration</span>.<span class="ruby-identifier">configure</span>=(<span class="ruby-identifier">config</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- configure-3D-source -->
@@ -400,11 +405,11 @@
one</p>
<div class="method-source-code" id="duration-source">
- <pre><span class="ruby-comment"># File lib/bigbench/benchmark.rb, line 122</span>
+ <pre><span class="ruby-comment"># File lib/bigbench/benchmark.rb, line 112</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">duration</span>
<span class="ruby-constant">Benchmark</span>.<span class="ruby-identifier">max_duration</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- duration-source -->
@@ -438,11 +443,11 @@
</pre>
<div class="method-source-code" id="load_test-21-source">
- <pre><span class="ruby-comment"># File lib/bigbench/runner.rb, line 45</span>
+ <pre><span class="ruby-comment"># File lib/bigbench/runner.rb, line 46</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">load_test!</span>(<span class="ruby-identifier">test</span>)
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Benchmark</span>.<span class="ruby-identifier">reset!</span>
<span class="ruby-identifier">eval</span>(<span class="ruby-identifier">test</span>)
<span class="ruby-identifier">check_config!</span>
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">loaded_tests</span>
@@ -471,11 +476,11 @@
<p>Runs all initialized benchmarks</p>
<div class="method-source-code" id="run-21-source">
- <pre><span class="ruby-comment"># File lib/bigbench/runner.rb, line 31</span>
+ <pre><span class="ruby-comment"># File lib/bigbench/runner.rb, line 32</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">run!</span>
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">running_benchmarks</span>
<span class="ruby-constant">Runner</span>.<span class="ruby-identifier">run!</span>
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">finished_running_benchmarks</span>
<span class="ruby-keyword">end</span></pre>
@@ -513,11 +518,11 @@
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">output</span>, <span class="ruby-string">"w+"</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">benchmarks</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">benchmark</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">benchmark</span>.<span class="ruby-identifier">tracker</span>.<span class="ruby-identifier">trackings</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tracking</span><span class="ruby-operator">|</span>
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">wrote_trackings</span>(<span class="ruby-identifier">counter</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">counter</span> <span class="ruby-operator">%</span> <span class="ruby-value">100</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
- <span class="ruby-identifier">file</span>.<span class="ruby-identifier">write</span> <span class="ruby-identifier">tracking</span> <span class="ruby-operator">+</span> <span class="ruby-string">"\n"</span>
+ <span class="ruby-identifier">file</span>.<span class="ruby-identifier">write</span> <span class="ruby-identifier">tracking</span>.<span class="ruby-identifier">to_json</span> <span class="ruby-operator">+</span> <span class="ruby-string">"\n"</span>
<span class="ruby-identifier">counter</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span>
@@ -597,10 +602,10 @@
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">writing_trackings</span>(<span class="ruby-identifier">trackings</span>)
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">benchmarks</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">benchmark</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">benchmark</span>.<span class="ruby-identifier">tracker</span>.<span class="ruby-identifier">trackings</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tracking</span><span class="ruby-operator">|</span>
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">wrote_trackings</span>(<span class="ruby-identifier">counter</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">counter</span> <span class="ruby-operator">%</span> <span class="ruby-value">100</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
- <span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">add_tracking</span>(<span class="ruby-identifier">tracking</span>)
+ <span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">add_tracking</span>(<span class="ruby-identifier">tracking</span>.<span class="ruby-identifier">to_json</span>)
<span class="ruby-identifier">counter</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span>
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">finished_writing_trackings</span>(<span class="ruby-identifier">counter</span>)