bigbench 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/README.textile +81 -0
- data/Rakefile +10 -0
- data/bigbench.gemspec +29 -0
- data/bin/bigbench +6 -0
- data/doc/BigBench.html +631 -0
- data/doc/BigBench/Benchmark.html +328 -0
- data/doc/BigBench/Benchmark/Benchmark.html +431 -0
- data/doc/BigBench/Bot.html +233 -0
- data/doc/BigBench/Configuration.html +312 -0
- data/doc/BigBench/Configuration/Config.html +375 -0
- data/doc/BigBench/Configuration/InvalidOptions.html +217 -0
- data/doc/BigBench/Executor.html +252 -0
- data/doc/BigBench/Executor/InvalidCommand.html +222 -0
- data/doc/BigBench/Fragment.html +404 -0
- data/doc/BigBench/Fragment/Fragment.html +384 -0
- data/doc/BigBench/Output.html +703 -0
- data/doc/BigBench/Runner.html +222 -0
- data/doc/BigBench/Runner/NoBenchmarksDefined.html +217 -0
- data/doc/BigBench/Store.html +639 -0
- data/doc/BigBench/Tracker.html +179 -0
- data/doc/BigBench/Tracker/Tracker.html +273 -0
- data/doc/Float.html +217 -0
- data/doc/Gemfile.html +129 -0
- data/doc/Helpers.html +163 -0
- data/doc/Object.html +181 -0
- data/doc/Rakefile.html +136 -0
- data/doc/TestWebServer.html +247 -0
- data/doc/created.rid +31 -0
- data/doc/images/add.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +122 -0
- data/doc/js/darkfish.js +153 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/lib/bigbench/help/executor_txt.html +145 -0
- data/doc/rdoc.css +543 -0
- data/doc/table_of_contents.html +263 -0
- data/lib/bigbench.rb +18 -0
- data/lib/bigbench/benchmark.rb +126 -0
- data/lib/bigbench/bot.rb +34 -0
- data/lib/bigbench/configuration.rb +109 -0
- data/lib/bigbench/executor.rb +131 -0
- data/lib/bigbench/float_extensions.rb +6 -0
- data/lib/bigbench/fragment.rb +119 -0
- data/lib/bigbench/help/executor.txt +17 -0
- data/lib/bigbench/initializers.rb +2 -0
- data/lib/bigbench/output.rb +116 -0
- data/lib/bigbench/runner.rb +52 -0
- data/lib/bigbench/store.rb +92 -0
- data/lib/bigbench/tracker.rb +79 -0
- data/lib/bigbench/version.rb +3 -0
- data/spec/benchmark_spec.rb +69 -0
- data/spec/bot_spec.rb +31 -0
- data/spec/configure_spec.rb +39 -0
- data/spec/executor_spec.rb +80 -0
- data/spec/fragment_spec.rb +110 -0
- data/spec/helpers.rb +19 -0
- data/spec/lib/test_web_server.rb +18 -0
- data/spec/runner_spec.rb +40 -0
- data/spec/store_spec.rb +72 -0
- data/spec/tests/local.rb +15 -0
- data/spec/tests/local_invalid.rb +9 -0
- data/spec/tracker_spec.rb +50 -0
- data/spec/webserver_spec.rb +35 -0
- metadata +220 -0
@@ -0,0 +1,233 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>module BigBench::Bot - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="module">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
<div id="file-metadata">
|
47
|
+
<nav id="file-list-section" class="section">
|
48
|
+
<h3 class="section-header">Defined In</h3>
|
49
|
+
<ul>
|
50
|
+
<li>lib/bigbench/bot.rb
|
51
|
+
</ul>
|
52
|
+
</nav>
|
53
|
+
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div id="class-metadata">
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
<!-- Method Quickref -->
|
62
|
+
<nav id="method-list-section" class="section">
|
63
|
+
<h3 class="section-header">Methods</h3>
|
64
|
+
|
65
|
+
<ul class="link-list">
|
66
|
+
|
67
|
+
<li><a href="#method-c-check_test-21">::check_test!</a>
|
68
|
+
|
69
|
+
</ul>
|
70
|
+
</nav>
|
71
|
+
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<div id="project-metadata">
|
75
|
+
<nav id="fileindex-section" class="section project-section">
|
76
|
+
<h3 class="section-header">Pages</h3>
|
77
|
+
|
78
|
+
<ul>
|
79
|
+
|
80
|
+
<li class="file"><a href="../Gemfile.html">Gemfile</a>
|
81
|
+
|
82
|
+
<li class="file"><a href="../Rakefile.html">Rakefile</a>
|
83
|
+
|
84
|
+
<li class="file"><a href="../lib/bigbench/help/executor_txt.html">executor</a>
|
85
|
+
|
86
|
+
</ul>
|
87
|
+
</nav>
|
88
|
+
|
89
|
+
<nav id="classindex-section" class="section project-section">
|
90
|
+
<h3 class="section-header">Class and Module Index</h3>
|
91
|
+
|
92
|
+
<ul class="link-list">
|
93
|
+
|
94
|
+
<li><a href="../BigBench.html">BigBench</a>
|
95
|
+
|
96
|
+
<li><a href="../BigBench/Benchmark.html">BigBench::Benchmark</a>
|
97
|
+
|
98
|
+
<li><a href="../BigBench/Benchmark/Benchmark.html">BigBench::Benchmark::Benchmark</a>
|
99
|
+
|
100
|
+
<li><a href="../BigBench/Bot.html">BigBench::Bot</a>
|
101
|
+
|
102
|
+
<li><a href="../BigBench/Configuration.html">BigBench::Configuration</a>
|
103
|
+
|
104
|
+
<li><a href="../BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
|
105
|
+
|
106
|
+
<li><a href="../BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
|
107
|
+
|
108
|
+
<li><a href="../BigBench/Executor.html">BigBench::Executor</a>
|
109
|
+
|
110
|
+
<li><a href="../BigBench/Executor/InvalidCommand.html">BigBench::Executor::InvalidCommand</a>
|
111
|
+
|
112
|
+
<li><a href="../BigBench/Fragment.html">BigBench::Fragment</a>
|
113
|
+
|
114
|
+
<li><a href="../BigBench/Fragment/Fragment.html">BigBench::Fragment::Fragment</a>
|
115
|
+
|
116
|
+
<li><a href="../BigBench/Output.html">BigBench::Output</a>
|
117
|
+
|
118
|
+
<li><a href="../BigBench/Runner.html">BigBench::Runner</a>
|
119
|
+
|
120
|
+
<li><a href="../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
121
|
+
|
122
|
+
<li><a href="../BigBench/Store.html">BigBench::Store</a>
|
123
|
+
|
124
|
+
<li><a href="../BigBench/Tracker.html">BigBench::Tracker</a>
|
125
|
+
|
126
|
+
<li><a href="../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
|
127
|
+
|
128
|
+
<li><a href="../Float.html">Float</a>
|
129
|
+
|
130
|
+
<li><a href="../Helpers.html">Helpers</a>
|
131
|
+
|
132
|
+
<li><a href="../Object.html">Object</a>
|
133
|
+
|
134
|
+
<li><a href="../TestWebServer.html">TestWebServer</a>
|
135
|
+
|
136
|
+
</ul>
|
137
|
+
</nav>
|
138
|
+
|
139
|
+
</div>
|
140
|
+
</nav>
|
141
|
+
|
142
|
+
<div id="documentation">
|
143
|
+
<h1 class="module">module BigBench::Bot</h1>
|
144
|
+
|
145
|
+
<div id="description" class="description">
|
146
|
+
|
147
|
+
<p>A bot is used for remote testing. It is running in the background of a
|
148
|
+
machine and waits for tests to run. If you want to run a test with a
|
149
|
+
cluster of 20 machines, simply set them all up and start the bot with:</p>
|
150
|
+
|
151
|
+
<pre>bigbench start bot [REDIS_RUL_WITH_PORT REDIS_PASSWORD]</pre>
|
152
|
+
|
153
|
+
<p>A bot will automatically check for a new test every minute. If a new test
|
154
|
+
is available it runs the test and reports its results back to the redis.
|
155
|
+
After that it goes into listening mode again.</p>
|
156
|
+
|
157
|
+
</div><!-- description -->
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<!-- Methods -->
|
172
|
+
|
173
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
174
|
+
<h3 class="section-header">Public Class Methods</h3>
|
175
|
+
|
176
|
+
|
177
|
+
<div id="method-c-check_test-21" class="method-detail ">
|
178
|
+
|
179
|
+
<div class="method-heading">
|
180
|
+
<span class="method-name">check_test!</span><span
|
181
|
+
class="method-args">()</span>
|
182
|
+
<span class="method-click-advice">click to toggle source</span>
|
183
|
+
</div>
|
184
|
+
|
185
|
+
|
186
|
+
<div class="method-description">
|
187
|
+
|
188
|
+
<p>Checks if there is a new test waiting on the store.</p>
|
189
|
+
|
190
|
+
<p>If yes, it loads this test and executes it. After it has finished it writes
|
191
|
+
its trackings to the stores tracking array.</p>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<div class="method-source-code" id="check_test-21-source">
|
196
|
+
<pre><span class="ruby-comment"># File lib/bigbench/bot.rb, line 18</span>
|
197
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">check_test!</span>
|
198
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">running?</span>
|
199
|
+
|
200
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">bot_received_test_instructions</span>
|
201
|
+
<span class="ruby-ivar">@id</span> = <span class="ruby-constant">SecureRandom</span>.<span class="ruby-identifier">hex</span>(<span class="ruby-value">16</span>) <span class="ruby-keyword">if</span> <span class="ruby-ivar">@id</span>.<span class="ruby-identifier">nil?</span>
|
202
|
+
|
203
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">mode</span> = <span class="ruby-value">:bot</span>
|
204
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">load_test!</span>(<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">test</span>)
|
205
|
+
|
206
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">bot_is_working</span>(<span class="ruby-ivar">@id</span>)
|
207
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">run!</span>
|
208
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">write_trackings_to_store!</span>
|
209
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">bot_stopped_working</span>(<span class="ruby-ivar">@id</span>)
|
210
|
+
<span class="ruby-keyword">end</span></pre>
|
211
|
+
</div><!-- check_test-21-source -->
|
212
|
+
|
213
|
+
</div>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
</div><!-- check_test-21-method -->
|
219
|
+
|
220
|
+
|
221
|
+
</section><!-- public-class-method-details -->
|
222
|
+
|
223
|
+
</section><!-- 5Buntitled-5D -->
|
224
|
+
|
225
|
+
</div><!-- documentation -->
|
226
|
+
|
227
|
+
|
228
|
+
<footer id="validator-badges">
|
229
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
230
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
231
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
232
|
+
</footer>
|
233
|
+
|
@@ -0,0 +1,312 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>module BigBench::Configuration - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="module">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
<div id="file-metadata">
|
47
|
+
<nav id="file-list-section" class="section">
|
48
|
+
<h3 class="section-header">Defined In</h3>
|
49
|
+
<ul>
|
50
|
+
<li>lib/bigbench/configuration.rb
|
51
|
+
</ul>
|
52
|
+
</nav>
|
53
|
+
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div id="class-metadata">
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
<!-- Method Quickref -->
|
62
|
+
<nav id="method-list-section" class="section">
|
63
|
+
<h3 class="section-header">Methods</h3>
|
64
|
+
|
65
|
+
<ul class="link-list">
|
66
|
+
|
67
|
+
<li><a href="#method-c-config">::config</a>
|
68
|
+
|
69
|
+
<li><a href="#method-c-configure-3D">::configure=</a>
|
70
|
+
|
71
|
+
<li><a href="#method-c-reset-21">::reset!</a>
|
72
|
+
|
73
|
+
</ul>
|
74
|
+
</nav>
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
<div id="project-metadata">
|
79
|
+
<nav id="fileindex-section" class="section project-section">
|
80
|
+
<h3 class="section-header">Pages</h3>
|
81
|
+
|
82
|
+
<ul>
|
83
|
+
|
84
|
+
<li class="file"><a href="../Gemfile.html">Gemfile</a>
|
85
|
+
|
86
|
+
<li class="file"><a href="../Rakefile.html">Rakefile</a>
|
87
|
+
|
88
|
+
<li class="file"><a href="../lib/bigbench/help/executor_txt.html">executor</a>
|
89
|
+
|
90
|
+
</ul>
|
91
|
+
</nav>
|
92
|
+
|
93
|
+
<nav id="classindex-section" class="section project-section">
|
94
|
+
<h3 class="section-header">Class and Module Index</h3>
|
95
|
+
|
96
|
+
<ul class="link-list">
|
97
|
+
|
98
|
+
<li><a href="../BigBench.html">BigBench</a>
|
99
|
+
|
100
|
+
<li><a href="../BigBench/Benchmark.html">BigBench::Benchmark</a>
|
101
|
+
|
102
|
+
<li><a href="../BigBench/Benchmark/Benchmark.html">BigBench::Benchmark::Benchmark</a>
|
103
|
+
|
104
|
+
<li><a href="../BigBench/Bot.html">BigBench::Bot</a>
|
105
|
+
|
106
|
+
<li><a href="../BigBench/Configuration.html">BigBench::Configuration</a>
|
107
|
+
|
108
|
+
<li><a href="../BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
|
109
|
+
|
110
|
+
<li><a href="../BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
|
111
|
+
|
112
|
+
<li><a href="../BigBench/Executor.html">BigBench::Executor</a>
|
113
|
+
|
114
|
+
<li><a href="../BigBench/Executor/InvalidCommand.html">BigBench::Executor::InvalidCommand</a>
|
115
|
+
|
116
|
+
<li><a href="../BigBench/Fragment.html">BigBench::Fragment</a>
|
117
|
+
|
118
|
+
<li><a href="../BigBench/Fragment/Fragment.html">BigBench::Fragment::Fragment</a>
|
119
|
+
|
120
|
+
<li><a href="../BigBench/Output.html">BigBench::Output</a>
|
121
|
+
|
122
|
+
<li><a href="../BigBench/Runner.html">BigBench::Runner</a>
|
123
|
+
|
124
|
+
<li><a href="../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
125
|
+
|
126
|
+
<li><a href="../BigBench/Store.html">BigBench::Store</a>
|
127
|
+
|
128
|
+
<li><a href="../BigBench/Tracker.html">BigBench::Tracker</a>
|
129
|
+
|
130
|
+
<li><a href="../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
|
131
|
+
|
132
|
+
<li><a href="../Float.html">Float</a>
|
133
|
+
|
134
|
+
<li><a href="../Helpers.html">Helpers</a>
|
135
|
+
|
136
|
+
<li><a href="../Object.html">Object</a>
|
137
|
+
|
138
|
+
<li><a href="../TestWebServer.html">TestWebServer</a>
|
139
|
+
|
140
|
+
</ul>
|
141
|
+
</nav>
|
142
|
+
|
143
|
+
</div>
|
144
|
+
</nav>
|
145
|
+
|
146
|
+
<div id="documentation">
|
147
|
+
<h1 class="module">module BigBench::Configuration</h1>
|
148
|
+
|
149
|
+
<div id="description" class="description">
|
150
|
+
|
151
|
+
<p>The configuration is configured in the test reciepts and looks like this:</p>
|
152
|
+
|
153
|
+
<pre class="ruby"><span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">configure</span> = {
|
154
|
+
:<span class="ruby-identifier">duration</span> =<span class="ruby-operator">></span> <span class="ruby-value">10</span>.<span class="ruby-identifier">seconds</span>,
|
155
|
+
:<span class="ruby-identifier">output</span> =<span class="ruby-operator">></span> <span class="ruby-string">"test.ljson"</span>,
|
156
|
+
:<span class="ruby-identifier">threads</span> =<span class="ruby-operator">></span> <span class="ruby-value">20</span>
|
157
|
+
}
|
158
|
+
</pre>
|
159
|
+
|
160
|
+
<p>Single values can be set and retrieved like this:</p>
|
161
|
+
|
162
|
+
<pre class="ruby"><span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">duration</span> = <span class="ruby-value">20</span>.<span class="ruby-identifier">minutes</span>
|
163
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">duration</span> <span class="ruby-comment"># => 1200 (seconds)</span>
|
164
|
+
</pre>
|
165
|
+
|
166
|
+
<p>The following configuration values are possible - stared configurations
|
167
|
+
need to be present:</p>
|
168
|
+
<dl class="rdoc-list label-list"><dt>duration*
|
169
|
+
<dd>
|
170
|
+
<p>How long will the benchmark take by default. This value can be overridden
|
171
|
+
by every benchmark.</p>
|
172
|
+
</dd><dt>output*
|
173
|
+
<dd>
|
174
|
+
<p>The file where the results should be written to. Usually one takes the
|
175
|
+
<code>*.ljson</code> format which is simply a file that contains a fully
|
176
|
+
valid JSON object on every line. This makes it easy to process the results
|
177
|
+
later on, because there’s no need to parse the whole results JSON, which
|
178
|
+
can get huge, at once.</p>
|
179
|
+
</dd><dt>threads
|
180
|
+
<dd>
|
181
|
+
<p>How many threads execute the benchmarks. This can be overridden by every
|
182
|
+
benchmark and defaults to <code>1</code>.</p>
|
183
|
+
</dd></dl>
|
184
|
+
|
185
|
+
</div><!-- description -->
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
<!-- Methods -->
|
200
|
+
|
201
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
202
|
+
<h3 class="section-header">Public Class Methods</h3>
|
203
|
+
|
204
|
+
|
205
|
+
<div id="method-c-config" class="method-detail ">
|
206
|
+
|
207
|
+
<div class="method-heading">
|
208
|
+
<span class="method-name">config</span><span
|
209
|
+
class="method-args">()</span>
|
210
|
+
<span class="method-click-advice">click to toggle source</span>
|
211
|
+
</div>
|
212
|
+
|
213
|
+
|
214
|
+
<div class="method-description">
|
215
|
+
|
216
|
+
<p>Returns the current config object</p>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
<div class="method-source-code" id="config-source">
|
221
|
+
<pre><span class="ruby-comment"># File lib/bigbench/configuration.rb, line 70</span>
|
222
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">config</span>
|
223
|
+
<span class="ruby-ivar">@config</span>
|
224
|
+
<span class="ruby-keyword">end</span></pre>
|
225
|
+
</div><!-- config-source -->
|
226
|
+
|
227
|
+
</div>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
</div><!-- config-method -->
|
233
|
+
|
234
|
+
|
235
|
+
<div id="method-c-configure-3D" class="method-detail ">
|
236
|
+
|
237
|
+
<div class="method-heading">
|
238
|
+
<span class="method-name">configure=</span><span
|
239
|
+
class="method-args">(config)</span>
|
240
|
+
<span class="method-click-advice">click to toggle source</span>
|
241
|
+
</div>
|
242
|
+
|
243
|
+
|
244
|
+
<div class="method-description">
|
245
|
+
|
246
|
+
<p>Configures the benchmarks with a hash. If the config methods are not
|
247
|
+
present yet, they are added to the config object</p>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
<div class="method-source-code" id="configure-3D-source">
|
252
|
+
<pre><span class="ruby-comment"># File lib/bigbench/configuration.rb, line 61</span>
|
253
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">configure=</span>(<span class="ruby-identifier">config</span>)
|
254
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-string">"Config must be a Hash"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
255
|
+
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">option</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
256
|
+
<span class="ruby-ivar">@config</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">add_option</span>(<span class="ruby-identifier">option</span>)
|
257
|
+
<span class="ruby-ivar">@config</span>.<span class="ruby-identifier">send</span> <span class="ruby-node">"#{option}="</span>, <span class="ruby-identifier">value</span>
|
258
|
+
}
|
259
|
+
<span class="ruby-keyword">end</span></pre>
|
260
|
+
</div><!-- configure-3D-source -->
|
261
|
+
|
262
|
+
</div>
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
</div><!-- configure-3D-method -->
|
268
|
+
|
269
|
+
|
270
|
+
<div id="method-c-reset-21" class="method-detail ">
|
271
|
+
|
272
|
+
<div class="method-heading">
|
273
|
+
<span class="method-name">reset!</span><span
|
274
|
+
class="method-args">()</span>
|
275
|
+
<span class="method-click-advice">click to toggle source</span>
|
276
|
+
</div>
|
277
|
+
|
278
|
+
|
279
|
+
<div class="method-description">
|
280
|
+
|
281
|
+
<p>Resets the config object</p>
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
<div class="method-source-code" id="reset-21-source">
|
286
|
+
<pre><span class="ruby-comment"># File lib/bigbench/configuration.rb, line 75</span>
|
287
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">reset!</span>
|
288
|
+
<span class="ruby-ivar">@config</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>
|
289
|
+
<span class="ruby-keyword">end</span></pre>
|
290
|
+
</div><!-- reset-21-source -->
|
291
|
+
|
292
|
+
</div>
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
</div><!-- reset-21-method -->
|
298
|
+
|
299
|
+
|
300
|
+
</section><!-- public-class-method-details -->
|
301
|
+
|
302
|
+
</section><!-- 5Buntitled-5D -->
|
303
|
+
|
304
|
+
</div><!-- documentation -->
|
305
|
+
|
306
|
+
|
307
|
+
<footer id="validator-badges">
|
308
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
309
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
310
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
311
|
+
</footer>
|
312
|
+
|