bigbench 0.0.4 → 0.0.5
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/README.textile +29 -249
- data/bigbench.gemspec +1 -0
- data/bin/bigbench +1 -1
- data/dev/request_sequence.dot +235 -0
- data/dev/request_sequence.pdf +0 -0
- data/dev/sequence.rb +48 -0
- data/doc/Array.html +5 -5
- data/doc/BigBench.html +27 -60
- data/doc/BigBench/Benchmark.html +5 -5
- data/doc/BigBench/Benchmark/Benchmark.html +8 -8
- data/doc/BigBench/Benchmark/Looper.html +5 -5
- data/doc/BigBench/Bot.html +5 -5
- data/doc/BigBench/Configuration.html +29 -53
- data/doc/BigBench/Executor.html +14 -95
- data/doc/BigBench/Executor/Executable.html +551 -0
- data/doc/BigBench/Fragment.html +5 -5
- data/doc/BigBench/Fragment/Fragment.html +5 -5
- data/doc/BigBench/Output.html +7 -8
- data/doc/BigBench/PostProcessor.html +8 -8
- data/doc/BigBench/PostProcessor/Context.html +219 -0
- data/doc/BigBench/PostProcessor/Environment.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/Appearings.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/AttributeCluster.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/BenchmarkNotFound.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/Cluster.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/NormalDistribution.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/PolynomialRegression.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/Statistics.html +5 -5
- data/doc/BigBench/PostProcessor/Graphs.html +5 -5
- data/doc/BigBench/PostProcessor/Graphs/LineGraph.html +5 -5
- data/doc/BigBench/PostProcessor/Graphs/PieGraph.html +5 -5
- data/doc/BigBench/PostProcessor/InvalidProcessor.html +6 -6
- data/doc/BigBench/PostProcessor/Processor.html +6 -6
- data/doc/BigBench/PostProcessor/Statistics.html +5 -5
- data/doc/BigBench/PostProcessor/Test.html +6 -6
- data/doc/BigBench/PostProcessor/TestPretty.html +249 -0
- data/doc/BigBench/Runner.html +5 -5
- data/doc/BigBench/Runner/NoBenchmarksDefined.html +5 -5
- data/doc/BigBench/Store.html +8 -8
- data/doc/BigBench/Tracker.html +5 -5
- data/doc/BigBench/Tracker/Tracker.html +5 -5
- data/doc/EventMachineLoop.html +5 -5
- data/doc/Float.html +5 -5
- data/doc/Gemfile.html +5 -5
- data/doc/Helpers.html +5 -5
- data/doc/Object.html +24 -5
- data/doc/README_rdoc.html +51 -281
- data/doc/Rakefile.html +5 -5
- data/doc/created.rid +46 -46
- data/doc/index.html +51 -281
- data/doc/js/search_index.js +1 -1
- data/doc/lib/bigbench/help/executor_txt.html +14 -29
- data/doc/table_of_contents.html +63 -68
- data/lib/bigbench.rb +2 -0
- data/lib/bigbench/benchmark.rb +3 -3
- data/lib/bigbench/configuration.rb +29 -68
- data/lib/bigbench/executor.rb +100 -130
- data/lib/bigbench/help/executor.txt +9 -22
- data/lib/bigbench/output.rb +2 -3
- data/lib/bigbench/post_processor.rb +16 -4
- data/lib/bigbench/runner.rb +0 -1
- data/lib/bigbench/store.rb +2 -2
- data/lib/bigbench/templates/test_plan.rb.erb +17 -0
- data/lib/bigbench/version.rb +1 -1
- data/spec/configure_spec.rb +7 -18
- data/spec/executor_spec.rb +25 -35
- data/spec/post_processor_spec.rb +31 -1
- data/spec/post_processors/environment_spec.rb +5 -3
- data/spec/post_processors/graphs_spec.rb +8 -3
- data/spec/post_processors/statistics_spec.rb +6 -1
- data/spec/runner_spec.rb +7 -6
- data/spec/store_spec.rb +4 -3
- data/spec/tests/local.rb +5 -5
- data/spec/tests/with_post_processor.rb +5 -5
- data/spec/tracker_spec.rb +12 -8
- metadata +48 -31
- data/dev/test.rb +0 -13
data/doc/BigBench/Executor.html
CHANGED
@@ -58,17 +58,7 @@
|
|
58
58
|
|
59
59
|
|
60
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-run-21">::run!</a>
|
68
61
|
|
69
|
-
</ul>
|
70
|
-
</nav>
|
71
|
-
|
72
62
|
</div>
|
73
63
|
|
74
64
|
<div id="project-metadata">
|
@@ -105,13 +95,9 @@
|
|
105
95
|
|
106
96
|
<li><a href="../BigBench/Configuration.html">BigBench::Configuration</a>
|
107
97
|
|
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
98
|
<li><a href="../BigBench/Executor.html">BigBench::Executor</a>
|
113
99
|
|
114
|
-
<li><a href="../BigBench/Executor/
|
100
|
+
<li><a href="../BigBench/Executor/Executable.html">BigBench::Executor::Executable</a>
|
115
101
|
|
116
102
|
<li><a href="../BigBench/Fragment.html">BigBench::Fragment</a>
|
117
103
|
|
@@ -121,6 +107,8 @@
|
|
121
107
|
|
122
108
|
<li><a href="../BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
123
109
|
|
110
|
+
<li><a href="../BigBench/PostProcessor/Context.html">BigBench::PostProcessor::Context</a>
|
111
|
+
|
124
112
|
<li><a href="../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
125
113
|
|
126
114
|
<li><a href="../BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
@@ -151,6 +139,8 @@
|
|
151
139
|
|
152
140
|
<li><a href="../BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
153
141
|
|
142
|
+
<li><a href="../BigBench/PostProcessor/TestPretty.html">BigBench::PostProcessor::TestPretty</a>
|
143
|
+
|
154
144
|
<li><a href="../BigBench/Runner.html">BigBench::Runner</a>
|
155
145
|
|
156
146
|
<li><a href="../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
@@ -185,31 +175,16 @@
|
|
185
175
|
<p>Dispatches the command line commands to <a
|
186
176
|
href="../BigBench.html">BigBench</a> calls. Available commands are:</p>
|
187
177
|
|
188
|
-
<p>
|
189
|
-
|
190
|
-
<pre># Local Testing
|
191
|
-
bigbench run local PATH_TO_TEST # Runs a test from the local machine. No redis needed.
|
178
|
+
<p>Tasks:</p>
|
192
179
|
|
193
|
-
#
|
194
|
-
bigbench
|
195
|
-
bigbench
|
196
|
-
|
197
|
-
#
|
198
|
-
bigbench
|
199
|
-
|
200
|
-
#
|
201
|
-
bigbench run postprocessors PATH_TO_TEST # Runs all post processors of the test without running the test itself
|
202
|
-
bigbench run postprocessor PATH_TO_TEST POSTPROCESSOR # Runs the specified post processor on the output file
|
203
|
-
|
204
|
-
# Help
|
205
|
-
bigbench --help || show help # Displays this help</pre>
|
206
|
-
|
207
|
-
<p>Options:</p>
|
208
|
-
|
209
|
-
<pre class="ruby"><span class="ruby-constant">REDIS_URL_WITH_PORT</span> <span class="ruby-comment"># Defaults to http://localhost:6379</span>
|
210
|
-
<span class="ruby-constant">REDIS_PASSWORD</span> <span class="ruby-comment"># Defaults to no password</span>
|
211
|
-
<span class="ruby-constant">POSTPROCESSOR</span> <span class="ruby-comment"># A post processor module or its short name e.g. 'statistics'</span>
|
212
|
-
</pre>
|
180
|
+
<pre>bigbench -v # Show the version
|
181
|
+
bigbench bot [REDIS_URL_WITH_PORT] [REDIS_PASSWORD] # Start a bot on the current machine
|
182
|
+
bigbench bots TEST_FILE [REDIS_URL_WITH_PORT] [REDIS_PASSWORD] # Run the TEST_FILE on all bots
|
183
|
+
bigbench generate TEST_FILE # Generates a simple test file to customize further
|
184
|
+
bigbench help [TASK] # Describe available tasks or one specific task
|
185
|
+
bigbench local TEST_FILE # Run the TEST_FILE on the local machine
|
186
|
+
bigbench process TEST_FILE [POST_PROCESSOR] # Run all post processors of the testfile or the single POST_PROCESSOR
|
187
|
+
bigbench reset [REDIS_URL_WITH_PORT] [REDIS_PASSWORD] # Reset everything including the redis storage</pre>
|
213
188
|
|
214
189
|
</div><!-- description -->
|
215
190
|
|
@@ -222,67 +197,11 @@ bigbench --help || show help # Displays
|
|
222
197
|
|
223
198
|
|
224
199
|
|
225
|
-
<!-- Constants -->
|
226
|
-
<section id="constants-list" class="section">
|
227
|
-
<h3 class="section-header">Constants</h3>
|
228
|
-
<dl>
|
229
|
-
|
230
|
-
<dt id="COMMANDS">COMMANDS
|
231
|
-
|
232
|
-
<dd class="description">
|
233
|
-
|
234
|
-
|
235
|
-
</dl>
|
236
|
-
</section>
|
237
|
-
|
238
200
|
|
239
201
|
|
240
202
|
|
241
203
|
<!-- Methods -->
|
242
204
|
|
243
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
244
|
-
<h3 class="section-header">Public Class Methods</h3>
|
245
|
-
|
246
|
-
|
247
|
-
<div id="method-c-run-21" class="method-detail ">
|
248
|
-
|
249
|
-
<div class="method-heading">
|
250
|
-
<span class="method-name">run!</span><span
|
251
|
-
class="method-args">(argv)</span>
|
252
|
-
<span class="method-click-advice">click to toggle source</span>
|
253
|
-
</div>
|
254
|
-
|
255
|
-
|
256
|
-
<div class="method-description">
|
257
|
-
|
258
|
-
<p>Parses and runs the <a href="../BigBench.html">BigBench</a> funtion that is
|
259
|
-
supplied via the commandline’s ARGV. It throws an
|
260
|
-
<code>InvalidCommand</code> exception if the command is unknown.</p>
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
<div class="method-source-code" id="run-21-source">
|
265
|
-
<pre><span class="ruby-comment"># File lib/bigbench/executor.rb, line 32</span>
|
266
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">run!</span>(<span class="ruby-identifier">argv</span>)
|
267
|
-
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">start</span>
|
268
|
-
|
269
|
-
<span class="ruby-identifier">check_arguments!</span>(<span class="ruby-identifier">argv</span>)
|
270
|
-
<span class="ruby-identifier">send</span> <span class="ruby-identifier">to_executor_method</span>(<span class="ruby-identifier">argv</span>), <span class="ruby-identifier">argv</span>
|
271
|
-
|
272
|
-
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">done</span>
|
273
|
-
<span class="ruby-keyword">end</span></pre>
|
274
|
-
</div><!-- run-21-source -->
|
275
|
-
|
276
|
-
</div>
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
</div><!-- run-21-method -->
|
282
|
-
|
283
|
-
|
284
|
-
</section><!-- public-class-method-details -->
|
285
|
-
|
286
205
|
</section><!-- 5Buntitled-5D -->
|
287
206
|
|
288
207
|
</div><!-- documentation -->
|
@@ -0,0 +1,551 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class BigBench::Executor::Executable - 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="class">
|
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/executor.rb
|
51
|
+
</ul>
|
52
|
+
</nav>
|
53
|
+
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div id="class-metadata">
|
58
|
+
|
59
|
+
<nav id="parent-class-section" class="section">
|
60
|
+
<h3 class="section-header">Parent</h3>
|
61
|
+
|
62
|
+
<p class="link">Thor
|
63
|
+
|
64
|
+
</nav>
|
65
|
+
|
66
|
+
<!-- Included Modules -->
|
67
|
+
<nav id="includes-section" class="section">
|
68
|
+
<h3 class="section-header">Included Modules</h3>
|
69
|
+
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
|
73
|
+
<li><span class="include">Thor::Actions</span>
|
74
|
+
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
</nav>
|
78
|
+
|
79
|
+
<!-- Method Quickref -->
|
80
|
+
<nav id="method-list-section" class="section">
|
81
|
+
<h3 class="section-header">Methods</h3>
|
82
|
+
|
83
|
+
<ul class="link-list">
|
84
|
+
|
85
|
+
<li><a href="#method-c-source_root">::source_root</a>
|
86
|
+
|
87
|
+
<li><a href="#method-i-bot">#bot</a>
|
88
|
+
|
89
|
+
<li><a href="#method-i-bots">#bots</a>
|
90
|
+
|
91
|
+
<li><a href="#method-i-default">#default</a>
|
92
|
+
|
93
|
+
<li><a href="#method-i-generate">#generate</a>
|
94
|
+
|
95
|
+
<li><a href="#method-i-local">#local</a>
|
96
|
+
|
97
|
+
<li><a href="#method-i-process">#process</a>
|
98
|
+
|
99
|
+
<li><a href="#method-i-reset">#reset</a>
|
100
|
+
|
101
|
+
</ul>
|
102
|
+
</nav>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<div id="project-metadata">
|
107
|
+
<nav id="fileindex-section" class="section project-section">
|
108
|
+
<h3 class="section-header">Pages</h3>
|
109
|
+
|
110
|
+
<ul>
|
111
|
+
|
112
|
+
<li class="file"><a href="../../Gemfile.html">Gemfile</a>
|
113
|
+
|
114
|
+
<li class="file"><a href="../../README_rdoc.html">README</a>
|
115
|
+
|
116
|
+
<li class="file"><a href="../../Rakefile.html">Rakefile</a>
|
117
|
+
|
118
|
+
<li class="file"><a href="../../lib/bigbench/help/executor_txt.html">executor</a>
|
119
|
+
|
120
|
+
</ul>
|
121
|
+
</nav>
|
122
|
+
|
123
|
+
<nav id="classindex-section" class="section project-section">
|
124
|
+
<h3 class="section-header">Class and Module Index</h3>
|
125
|
+
|
126
|
+
<ul class="link-list">
|
127
|
+
|
128
|
+
<li><a href="../../BigBench.html">BigBench</a>
|
129
|
+
|
130
|
+
<li><a href="../../BigBench/Benchmark.html">BigBench::Benchmark</a>
|
131
|
+
|
132
|
+
<li><a href="../../BigBench/Benchmark/Benchmark.html">BigBench::Benchmark::Benchmark</a>
|
133
|
+
|
134
|
+
<li><a href="../../BigBench/Benchmark/Looper.html">BigBench::Benchmark::Looper</a>
|
135
|
+
|
136
|
+
<li><a href="../../BigBench/Bot.html">BigBench::Bot</a>
|
137
|
+
|
138
|
+
<li><a href="../../BigBench/Configuration.html">BigBench::Configuration</a>
|
139
|
+
|
140
|
+
<li><a href="../../BigBench/Executor.html">BigBench::Executor</a>
|
141
|
+
|
142
|
+
<li><a href="../../BigBench/Executor/Executable.html">BigBench::Executor::Executable</a>
|
143
|
+
|
144
|
+
<li><a href="../../BigBench/Fragment.html">BigBench::Fragment</a>
|
145
|
+
|
146
|
+
<li><a href="../../BigBench/Fragment/Fragment.html">BigBench::Fragment::Fragment</a>
|
147
|
+
|
148
|
+
<li><a href="../../BigBench/Output.html">BigBench::Output</a>
|
149
|
+
|
150
|
+
<li><a href="../../BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
151
|
+
|
152
|
+
<li><a href="../../BigBench/PostProcessor/Context.html">BigBench::PostProcessor::Context</a>
|
153
|
+
|
154
|
+
<li><a href="../../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
155
|
+
|
156
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
157
|
+
|
158
|
+
<li><a href="../../BigBench/PostProcessor/Environment/AttributeCluster.html">BigBench::PostProcessor::Environment::AttributeCluster</a>
|
159
|
+
|
160
|
+
<li><a href="../../BigBench/PostProcessor/Environment/BenchmarkNotFound.html">BigBench::PostProcessor::Environment::BenchmarkNotFound</a>
|
161
|
+
|
162
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Cluster.html">BigBench::PostProcessor::Environment::Cluster</a>
|
163
|
+
|
164
|
+
<li><a href="../../BigBench/PostProcessor/Environment/NormalDistribution.html">BigBench::PostProcessor::Environment::NormalDistribution</a>
|
165
|
+
|
166
|
+
<li><a href="../../BigBench/PostProcessor/Environment/PolynomialRegression.html">BigBench::PostProcessor::Environment::PolynomialRegression</a>
|
167
|
+
|
168
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Statistics.html">BigBench::PostProcessor::Environment::Statistics</a>
|
169
|
+
|
170
|
+
<li><a href="../../BigBench/PostProcessor/Graphs.html">BigBench::PostProcessor::Graphs</a>
|
171
|
+
|
172
|
+
<li><a href="../../BigBench/PostProcessor/Graphs/LineGraph.html">BigBench::PostProcessor::Graphs::LineGraph</a>
|
173
|
+
|
174
|
+
<li><a href="../../BigBench/PostProcessor/Graphs/PieGraph.html">BigBench::PostProcessor::Graphs::PieGraph</a>
|
175
|
+
|
176
|
+
<li><a href="../../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
177
|
+
|
178
|
+
<li><a href="../../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
179
|
+
|
180
|
+
<li><a href="../../BigBench/PostProcessor/Statistics.html">BigBench::PostProcessor::Statistics</a>
|
181
|
+
|
182
|
+
<li><a href="../../BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
183
|
+
|
184
|
+
<li><a href="../../BigBench/PostProcessor/TestPretty.html">BigBench::PostProcessor::TestPretty</a>
|
185
|
+
|
186
|
+
<li><a href="../../BigBench/Runner.html">BigBench::Runner</a>
|
187
|
+
|
188
|
+
<li><a href="../../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
189
|
+
|
190
|
+
<li><a href="../../BigBench/Store.html">BigBench::Store</a>
|
191
|
+
|
192
|
+
<li><a href="../../BigBench/Tracker.html">BigBench::Tracker</a>
|
193
|
+
|
194
|
+
<li><a href="../../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
|
195
|
+
|
196
|
+
<li><a href="../../Array.html">Array</a>
|
197
|
+
|
198
|
+
<li><a href="../../EventMachineLoop.html">EventMachineLoop</a>
|
199
|
+
|
200
|
+
<li><a href="../../Float.html">Float</a>
|
201
|
+
|
202
|
+
<li><a href="../../Helpers.html">Helpers</a>
|
203
|
+
|
204
|
+
<li><a href="../../Object.html">Object</a>
|
205
|
+
|
206
|
+
</ul>
|
207
|
+
</nav>
|
208
|
+
|
209
|
+
</div>
|
210
|
+
</nav>
|
211
|
+
|
212
|
+
<div id="documentation">
|
213
|
+
<h1 class="class">class BigBench::Executor::Executable</h1>
|
214
|
+
|
215
|
+
<div id="description" class="description">
|
216
|
+
|
217
|
+
</div><!-- description -->
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
<!-- Methods -->
|
232
|
+
|
233
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
234
|
+
<h3 class="section-header">Public Class Methods</h3>
|
235
|
+
|
236
|
+
|
237
|
+
<div id="method-c-source_root" class="method-detail ">
|
238
|
+
|
239
|
+
<div class="method-heading">
|
240
|
+
<span class="method-name">source_root</span><span
|
241
|
+
class="method-args">()</span>
|
242
|
+
<span class="method-click-advice">click to toggle source</span>
|
243
|
+
</div>
|
244
|
+
|
245
|
+
|
246
|
+
<div class="method-description">
|
247
|
+
|
248
|
+
<p>Templates are here</p>
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
<div class="method-source-code" id="source_root-source">
|
253
|
+
<pre><span class="ruby-comment"># File lib/bigbench/executor.rb, line 12</span>
|
254
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">source_root</span>
|
255
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword">__FILE__</span>), <span class="ruby-string">"templates"</span>)
|
256
|
+
<span class="ruby-keyword">end</span></pre>
|
257
|
+
</div><!-- source_root-source -->
|
258
|
+
|
259
|
+
</div>
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
</div><!-- source_root-method -->
|
265
|
+
|
266
|
+
|
267
|
+
</section><!-- public-class-method-details -->
|
268
|
+
|
269
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
270
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
271
|
+
|
272
|
+
|
273
|
+
<div id="method-i-bot" class="method-detail ">
|
274
|
+
|
275
|
+
<div class="method-heading">
|
276
|
+
<span class="method-name">bot</span><span
|
277
|
+
class="method-args">(redis_url = nil, redis_password = nil)</span>
|
278
|
+
<span class="method-click-advice">click to toggle source</span>
|
279
|
+
</div>
|
280
|
+
|
281
|
+
|
282
|
+
<div class="method-description">
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
<div class="method-source-code" id="bot-source">
|
289
|
+
<pre><span class="ruby-comment"># File lib/bigbench/executor.rb, line 75</span>
|
290
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">bot</span>(<span class="ruby-identifier">redis_url</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">redis_password</span> = <span class="ruby-keyword">nil</span>)
|
291
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">setup!</span>(<span class="ruby-identifier">redis_url</span>, <span class="ruby-identifier">redis_password</span>)
|
292
|
+
|
293
|
+
<span class="ruby-identifier">loop</span> {
|
294
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">bot_is_checking</span>
|
295
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Bot</span>.<span class="ruby-identifier">check_test!</span>
|
296
|
+
<span class="ruby-identifier">sleep</span>(<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">bot_checks_every</span>.<span class="ruby-identifier">to_i</span>)
|
297
|
+
}
|
298
|
+
<span class="ruby-keyword">end</span></pre>
|
299
|
+
</div><!-- bot-source -->
|
300
|
+
|
301
|
+
</div>
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
</div><!-- bot-method -->
|
307
|
+
|
308
|
+
|
309
|
+
<div id="method-i-bots" class="method-detail ">
|
310
|
+
|
311
|
+
<div class="method-heading">
|
312
|
+
<span class="method-name">bots</span><span
|
313
|
+
class="method-args">(file, redis_url = nil, redis_password = nil)</span>
|
314
|
+
<span class="method-click-advice">click to toggle source</span>
|
315
|
+
</div>
|
316
|
+
|
317
|
+
|
318
|
+
<div class="method-description">
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
<div class="method-source-code" id="bots-source">
|
325
|
+
<pre><span class="ruby-comment"># File lib/bigbench/executor.rb, line 35</span>
|
326
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">bots</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">redis_url</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">redis_password</span> = <span class="ruby-keyword">nil</span>)
|
327
|
+
|
328
|
+
<span class="ruby-comment"># Load and validate tests</span>
|
329
|
+
<span class="ruby-identifier">test</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>, <span class="ruby-string">"rb"</span>){ <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">read</span> }
|
330
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">load_test!</span>(<span class="ruby-identifier">test</span>)
|
331
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">mode</span> = <span class="ruby-value">:bots</span>
|
332
|
+
|
333
|
+
<span class="ruby-comment"># Initialize redis</span>
|
334
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">setup!</span>(<span class="ruby-identifier">redis_url</span>, <span class="ruby-identifier">redis_password</span>)
|
335
|
+
|
336
|
+
<span class="ruby-comment"># Load current test to redis & start bots</span>
|
337
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">test</span> = <span class="ruby-identifier">test</span>
|
338
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">start</span>
|
339
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">deployed_test</span>
|
340
|
+
|
341
|
+
<span class="ruby-comment"># Wait for bots to run the tests</span>
|
342
|
+
<span class="ruby-ivar">@is_running</span> = <span class="ruby-keyword">true</span>
|
343
|
+
<span class="ruby-identifier">timer</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span>{
|
344
|
+
<span class="ruby-identifier">sleep</span>(<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">duration</span>.<span class="ruby-identifier">to_i</span>)
|
345
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">stop</span>
|
346
|
+
<span class="ruby-ivar">@is_running</span> = <span class="ruby-keyword">false</span>
|
347
|
+
}
|
348
|
+
|
349
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">starting_bots_loop</span>
|
350
|
+
<span class="ruby-identifier">loop</span>{
|
351
|
+
<span class="ruby-identifier">bots</span> = <span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">bots</span>
|
352
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">running_bots_loop</span>(<span class="ruby-identifier">bots</span>)
|
353
|
+
<span class="ruby-identifier">sleep</span>(<span class="ruby-value">1</span>)
|
354
|
+
<span class="ruby-keyword">break</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@is_running</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">bots</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
355
|
+
}
|
356
|
+
|
357
|
+
<span class="ruby-comment"># Gather trackings from redis and write them to the file</span>
|
358
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">finished_bots_loop</span>
|
359
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">write_store_trackings_to_file!</span>
|
360
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">run_post_processors!</span>
|
361
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">reset!</span>
|
362
|
+
<span class="ruby-keyword">end</span></pre>
|
363
|
+
</div><!-- bots-source -->
|
364
|
+
|
365
|
+
</div>
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
</div><!-- bots-method -->
|
371
|
+
|
372
|
+
|
373
|
+
<div id="method-i-default" class="method-detail ">
|
374
|
+
|
375
|
+
<div class="method-heading">
|
376
|
+
<span class="method-name">default</span><span
|
377
|
+
class="method-args">()</span>
|
378
|
+
<span class="method-click-advice">click to toggle source</span>
|
379
|
+
</div>
|
380
|
+
|
381
|
+
|
382
|
+
<div class="method-description">
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
<div class="method-source-code" id="default-source">
|
389
|
+
<pre><span class="ruby-comment"># File lib/bigbench/executor.rb, line 19</span>
|
390
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">default</span>
|
391
|
+
<span class="ruby-identifier">options</span>.<span class="ruby-identifier">version?</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">puts</span>(<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">help</span>
|
392
|
+
<span class="ruby-keyword">end</span></pre>
|
393
|
+
</div><!-- default-source -->
|
394
|
+
|
395
|
+
</div>
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
</div><!-- default-method -->
|
401
|
+
|
402
|
+
|
403
|
+
<div id="method-i-generate" class="method-detail ">
|
404
|
+
|
405
|
+
<div class="method-heading">
|
406
|
+
<span class="method-name">generate</span><span
|
407
|
+
class="method-args">(name)</span>
|
408
|
+
<span class="method-click-advice">click to toggle source</span>
|
409
|
+
</div>
|
410
|
+
|
411
|
+
|
412
|
+
<div class="method-description">
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
<div class="method-source-code" id="generate-source">
|
419
|
+
<pre><span class="ruby-comment"># File lib/bigbench/executor.rb, line 111</span>
|
420
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">generate</span>(<span class="ruby-identifier">name</span>)
|
421
|
+
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
|
422
|
+
<span class="ruby-identifier">template</span> <span class="ruby-string">"test_plan.rb.erb"</span>, <span class="ruby-node">"#{name}.rb"</span>
|
423
|
+
<span class="ruby-keyword">end</span></pre>
|
424
|
+
</div><!-- generate-source -->
|
425
|
+
|
426
|
+
</div>
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
</div><!-- generate-method -->
|
432
|
+
|
433
|
+
|
434
|
+
<div id="method-i-local" class="method-detail ">
|
435
|
+
|
436
|
+
<div class="method-heading">
|
437
|
+
<span class="method-name">local</span><span
|
438
|
+
class="method-args">(file)</span>
|
439
|
+
<span class="method-click-advice">click to toggle source</span>
|
440
|
+
</div>
|
441
|
+
|
442
|
+
|
443
|
+
<div class="method-description">
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
<div class="method-source-code" id="local-source">
|
450
|
+
<pre><span class="ruby-comment"># File lib/bigbench/executor.rb, line 26</span>
|
451
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">local</span>(<span class="ruby-identifier">file</span>)
|
452
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">load_test!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>, <span class="ruby-string">"rb"</span>){ <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">read</span> }
|
453
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">run!</span>
|
454
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">write_local_trackings_to_file!</span>
|
455
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">run_post_processors!</span>
|
456
|
+
<span class="ruby-keyword">end</span></pre>
|
457
|
+
</div><!-- local-source -->
|
458
|
+
|
459
|
+
</div>
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
</div><!-- local-method -->
|
465
|
+
|
466
|
+
|
467
|
+
<div id="method-i-process" class="method-detail ">
|
468
|
+
|
469
|
+
<div class="method-heading">
|
470
|
+
<span class="method-name">process</span><span
|
471
|
+
class="method-args">(file, post_processor = nil)</span>
|
472
|
+
<span class="method-click-advice">click to toggle source</span>
|
473
|
+
</div>
|
474
|
+
|
475
|
+
|
476
|
+
<div class="method-description">
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
<div class="method-source-code" id="process-source">
|
483
|
+
<pre><span class="ruby-comment"># File lib/bigbench/executor.rb, line 87</span>
|
484
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">post_processor</span> = <span class="ruby-keyword">nil</span>)
|
485
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">load_test!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>, <span class="ruby-string">"rb"</span>){ <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">read</span> }
|
486
|
+
|
487
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">post_processor</span>
|
488
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">PostProcessor</span>.<span class="ruby-identifier">reset!</span>
|
489
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">post_process</span>(<span class="ruby-identifier">post_processor</span>)
|
490
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">run_post_processors!</span>
|
491
|
+
<span class="ruby-keyword">else</span>
|
492
|
+
<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">run_post_processors!</span>
|
493
|
+
<span class="ruby-keyword">end</span>
|
494
|
+
<span class="ruby-keyword">end</span></pre>
|
495
|
+
</div><!-- process-source -->
|
496
|
+
|
497
|
+
</div>
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
</div><!-- process-method -->
|
503
|
+
|
504
|
+
|
505
|
+
<div id="method-i-reset" class="method-detail ">
|
506
|
+
|
507
|
+
<div class="method-heading">
|
508
|
+
<span class="method-name">reset</span><span
|
509
|
+
class="method-args">(redis_url = nil, redis_password = nil)</span>
|
510
|
+
<span class="method-click-advice">click to toggle source</span>
|
511
|
+
</div>
|
512
|
+
|
513
|
+
|
514
|
+
<div class="method-description">
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
<div class="method-source-code" id="reset-source">
|
521
|
+
<pre><span class="ruby-comment"># File lib/bigbench/executor.rb, line 101</span>
|
522
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">reset</span>(<span class="ruby-identifier">redis_url</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">redis_password</span> = <span class="ruby-keyword">nil</span>)
|
523
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">setup!</span>(<span class="ruby-identifier">redis_url</span>, <span class="ruby-identifier">redis_password</span>)
|
524
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">reset!</span>
|
525
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Configuration</span>.<span class="ruby-identifier">reset!</span>
|
526
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Benchmark</span>.<span class="ruby-identifier">reset!</span>
|
527
|
+
<span class="ruby-constant">BigBench</span><span class="ruby-operator">::</span><span class="ruby-constant">Output</span>.<span class="ruby-identifier">reset</span>
|
528
|
+
<span class="ruby-keyword">end</span></pre>
|
529
|
+
</div><!-- reset-source -->
|
530
|
+
|
531
|
+
</div>
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
</div><!-- reset-method -->
|
537
|
+
|
538
|
+
|
539
|
+
</section><!-- public-instance-method-details -->
|
540
|
+
|
541
|
+
</section><!-- 5Buntitled-5D -->
|
542
|
+
|
543
|
+
</div><!-- documentation -->
|
544
|
+
|
545
|
+
|
546
|
+
<footer id="validator-badges">
|
547
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
548
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
549
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
550
|
+
</footer>
|
551
|
+
|