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,703 @@
|
|
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::Output - 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/output.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-bot_is_checking">::bot_is_checking</a>
|
68
|
+
|
69
|
+
<li><a href="#method-c-bot_received_test_instructions">::bot_received_test_instructions</a>
|
70
|
+
|
71
|
+
<li><a href="#method-c-deployed_test">::deployed_test</a>
|
72
|
+
|
73
|
+
<li><a href="#method-c-done">::done</a>
|
74
|
+
|
75
|
+
<li><a href="#method-c-finished_bots_loop">::finished_bots_loop</a>
|
76
|
+
|
77
|
+
<li><a href="#method-c-finished_running_benchmarks">::finished_running_benchmarks</a>
|
78
|
+
|
79
|
+
<li><a href="#method-c-finished_writing_trackings">::finished_writing_trackings</a>
|
80
|
+
|
81
|
+
<li><a href="#method-c-loaded_tests">::loaded_tests</a>
|
82
|
+
|
83
|
+
<li><a href="#method-c-reset">::reset</a>
|
84
|
+
|
85
|
+
<li><a href="#method-c-running_benchmarks">::running_benchmarks</a>
|
86
|
+
|
87
|
+
<li><a href="#method-c-running_bots_loop">::running_bots_loop</a>
|
88
|
+
|
89
|
+
<li><a href="#method-c-start">::start</a>
|
90
|
+
|
91
|
+
<li><a href="#method-c-starting_bots_loop">::starting_bots_loop</a>
|
92
|
+
|
93
|
+
<li><a href="#method-c-writing_trackings">::writing_trackings</a>
|
94
|
+
|
95
|
+
<li><a href="#method-c-wrote_trackings">::wrote_trackings</a>
|
96
|
+
|
97
|
+
</ul>
|
98
|
+
</nav>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<div id="project-metadata">
|
103
|
+
<nav id="fileindex-section" class="section project-section">
|
104
|
+
<h3 class="section-header">Pages</h3>
|
105
|
+
|
106
|
+
<ul>
|
107
|
+
|
108
|
+
<li class="file"><a href="../Gemfile.html">Gemfile</a>
|
109
|
+
|
110
|
+
<li class="file"><a href="../Rakefile.html">Rakefile</a>
|
111
|
+
|
112
|
+
<li class="file"><a href="../lib/bigbench/help/executor_txt.html">executor</a>
|
113
|
+
|
114
|
+
</ul>
|
115
|
+
</nav>
|
116
|
+
|
117
|
+
<nav id="classindex-section" class="section project-section">
|
118
|
+
<h3 class="section-header">Class and Module Index</h3>
|
119
|
+
|
120
|
+
<ul class="link-list">
|
121
|
+
|
122
|
+
<li><a href="../BigBench.html">BigBench</a>
|
123
|
+
|
124
|
+
<li><a href="../BigBench/Benchmark.html">BigBench::Benchmark</a>
|
125
|
+
|
126
|
+
<li><a href="../BigBench/Benchmark/Benchmark.html">BigBench::Benchmark::Benchmark</a>
|
127
|
+
|
128
|
+
<li><a href="../BigBench/Bot.html">BigBench::Bot</a>
|
129
|
+
|
130
|
+
<li><a href="../BigBench/Configuration.html">BigBench::Configuration</a>
|
131
|
+
|
132
|
+
<li><a href="../BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
|
133
|
+
|
134
|
+
<li><a href="../BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
|
135
|
+
|
136
|
+
<li><a href="../BigBench/Executor.html">BigBench::Executor</a>
|
137
|
+
|
138
|
+
<li><a href="../BigBench/Executor/InvalidCommand.html">BigBench::Executor::InvalidCommand</a>
|
139
|
+
|
140
|
+
<li><a href="../BigBench/Fragment.html">BigBench::Fragment</a>
|
141
|
+
|
142
|
+
<li><a href="../BigBench/Fragment/Fragment.html">BigBench::Fragment::Fragment</a>
|
143
|
+
|
144
|
+
<li><a href="../BigBench/Output.html">BigBench::Output</a>
|
145
|
+
|
146
|
+
<li><a href="../BigBench/Runner.html">BigBench::Runner</a>
|
147
|
+
|
148
|
+
<li><a href="../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
149
|
+
|
150
|
+
<li><a href="../BigBench/Store.html">BigBench::Store</a>
|
151
|
+
|
152
|
+
<li><a href="../BigBench/Tracker.html">BigBench::Tracker</a>
|
153
|
+
|
154
|
+
<li><a href="../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
|
155
|
+
|
156
|
+
<li><a href="../Float.html">Float</a>
|
157
|
+
|
158
|
+
<li><a href="../Helpers.html">Helpers</a>
|
159
|
+
|
160
|
+
<li><a href="../Object.html">Object</a>
|
161
|
+
|
162
|
+
<li><a href="../TestWebServer.html">TestWebServer</a>
|
163
|
+
|
164
|
+
</ul>
|
165
|
+
</nav>
|
166
|
+
|
167
|
+
</div>
|
168
|
+
</nav>
|
169
|
+
|
170
|
+
<div id="documentation">
|
171
|
+
<h1 class="module">module BigBench::Output</h1>
|
172
|
+
|
173
|
+
<div id="description" class="description">
|
174
|
+
|
175
|
+
<p>This module is used to keep all the command line outputs in a single place.
|
176
|
+
The output module gets notified of the code and can then do what it want’s
|
177
|
+
with this information.</p>
|
178
|
+
|
179
|
+
</div><!-- description -->
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<!-- Methods -->
|
194
|
+
|
195
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
196
|
+
<h3 class="section-header">Public Class Methods</h3>
|
197
|
+
|
198
|
+
|
199
|
+
<div id="method-c-bot_is_checking" class="method-detail ">
|
200
|
+
|
201
|
+
<div class="method-heading">
|
202
|
+
<span class="method-name">bot_is_checking</span><span
|
203
|
+
class="method-args">()</span>
|
204
|
+
<span class="method-click-advice">click to toggle source</span>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
|
208
|
+
<div class="method-description">
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
<div class="method-source-code" id="bot_is_checking-source">
|
215
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 104</span>
|
216
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">bot_is_checking</span>
|
217
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Checking for new tests at #{Time.now}"</span>
|
218
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
219
|
+
<span class="ruby-keyword">end</span></pre>
|
220
|
+
</div><!-- bot_is_checking-source -->
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
</div><!-- bot_is_checking-method -->
|
228
|
+
|
229
|
+
|
230
|
+
<div id="method-c-bot_received_test_instructions" class="method-detail ">
|
231
|
+
|
232
|
+
<div class="method-heading">
|
233
|
+
<span class="method-name">bot_received_test_instructions</span><span
|
234
|
+
class="method-args">()</span>
|
235
|
+
<span class="method-click-advice">click to toggle source</span>
|
236
|
+
</div>
|
237
|
+
|
238
|
+
|
239
|
+
<div class="method-description">
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
<div class="method-source-code" id="bot_received_test_instructions-source">
|
246
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 109</span>
|
247
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">bot_received_test_instructions</span>
|
248
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"\n-> Received\n"</span>
|
249
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"Received test instructions\n"</span>
|
250
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
251
|
+
<span class="ruby-keyword">end</span></pre>
|
252
|
+
</div><!-- bot_received_test_instructions-source -->
|
253
|
+
|
254
|
+
</div>
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
</div><!-- bot_received_test_instructions-method -->
|
260
|
+
|
261
|
+
|
262
|
+
<div id="method-c-deployed_test" class="method-detail ">
|
263
|
+
|
264
|
+
<div class="method-heading">
|
265
|
+
<span class="method-name">deployed_test</span><span
|
266
|
+
class="method-args">()</span>
|
267
|
+
<span class="method-click-advice">click to toggle source</span>
|
268
|
+
</div>
|
269
|
+
|
270
|
+
|
271
|
+
<div class="method-description">
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
<div class="method-source-code" id="deployed_test-source">
|
278
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 79</span>
|
279
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">deployed_test</span>
|
280
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"Deployed test to the redis store."</span>
|
281
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
282
|
+
<span class="ruby-keyword">end</span></pre>
|
283
|
+
</div><!-- deployed_test-source -->
|
284
|
+
|
285
|
+
</div>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
</div><!-- deployed_test-method -->
|
291
|
+
|
292
|
+
|
293
|
+
<div id="method-c-done" class="method-detail ">
|
294
|
+
|
295
|
+
<div class="method-heading">
|
296
|
+
<span class="method-name">done</span><span
|
297
|
+
class="method-args">()</span>
|
298
|
+
<span class="method-click-advice">click to toggle source</span>
|
299
|
+
</div>
|
300
|
+
|
301
|
+
|
302
|
+
<div class="method-description">
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
<div class="method-source-code" id="done-source">
|
309
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 18</span>
|
310
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">done</span>
|
311
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"\n-> Done. Took #{Time.now - @start} seconds."</span>
|
312
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
313
|
+
<span class="ruby-keyword">end</span></pre>
|
314
|
+
</div><!-- done-source -->
|
315
|
+
|
316
|
+
</div>
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
</div><!-- done-method -->
|
322
|
+
|
323
|
+
|
324
|
+
<div id="method-c-finished_bots_loop" class="method-detail ">
|
325
|
+
|
326
|
+
<div class="method-heading">
|
327
|
+
<span class="method-name">finished_bots_loop</span><span
|
328
|
+
class="method-args">()</span>
|
329
|
+
<span class="method-click-advice">click to toggle source</span>
|
330
|
+
</div>
|
331
|
+
|
332
|
+
|
333
|
+
<div class="method-description">
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
<div class="method-source-code" id="finished_bots_loop-source">
|
340
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 98</span>
|
341
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">finished_bots_loop</span>
|
342
|
+
<span class="ruby-identifier">print</span> <span class="ruby-string">"\r100% Done \n"</span>
|
343
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"Finished bots test."</span>
|
344
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
345
|
+
<span class="ruby-keyword">end</span></pre>
|
346
|
+
</div><!-- finished_bots_loop-source -->
|
347
|
+
|
348
|
+
</div>
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
</div><!-- finished_bots_loop-method -->
|
354
|
+
|
355
|
+
|
356
|
+
<div id="method-c-finished_running_benchmarks" class="method-detail ">
|
357
|
+
|
358
|
+
<div class="method-heading">
|
359
|
+
<span class="method-name">finished_running_benchmarks</span><span
|
360
|
+
class="method-args">()</span>
|
361
|
+
<span class="method-click-advice">click to toggle source</span>
|
362
|
+
</div>
|
363
|
+
|
364
|
+
|
365
|
+
<div class="method-description">
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
<div class="method-source-code" id="finished_running_benchmarks-source">
|
372
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 54</span>
|
373
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">finished_running_benchmarks</span>
|
374
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Finished #{BigBench.benchmarks.size} benchmarks."</span>
|
375
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
376
|
+
<span class="ruby-keyword">end</span></pre>
|
377
|
+
</div><!-- finished_running_benchmarks-source -->
|
378
|
+
|
379
|
+
</div>
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
</div><!-- finished_running_benchmarks-method -->
|
385
|
+
|
386
|
+
|
387
|
+
<div id="method-c-finished_writing_trackings" class="method-detail ">
|
388
|
+
|
389
|
+
<div class="method-heading">
|
390
|
+
<span class="method-name">finished_writing_trackings</span><span
|
391
|
+
class="method-args">(count)</span>
|
392
|
+
<span class="method-click-advice">click to toggle source</span>
|
393
|
+
</div>
|
394
|
+
|
395
|
+
|
396
|
+
<div class="method-description">
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
<div class="method-source-code" id="finished_writing_trackings-source">
|
403
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 72</span>
|
404
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">finished_writing_trackings</span>(<span class="ruby-identifier">count</span>)
|
405
|
+
<span class="ruby-identifier">print</span> <span class="ruby-string">"\r100% Done \n"</span>
|
406
|
+
<span class="ruby-identifier">target</span> = <span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">mode</span> <span class="ruby-operator">==</span> <span class="ruby-value">:bot</span> <span class="ruby-operator">?</span> <span class="ruby-string">'redis'</span> <span class="ruby-operator">:</span> <span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">output</span>
|
407
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"\nWrote #{count} trackings to #{target}."</span>
|
408
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
409
|
+
<span class="ruby-keyword">end</span></pre>
|
410
|
+
</div><!-- finished_writing_trackings-source -->
|
411
|
+
|
412
|
+
</div>
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
</div><!-- finished_writing_trackings-method -->
|
418
|
+
|
419
|
+
|
420
|
+
<div id="method-c-loaded_tests" class="method-detail ">
|
421
|
+
|
422
|
+
<div class="method-heading">
|
423
|
+
<span class="method-name">loaded_tests</span><span
|
424
|
+
class="method-args">()</span>
|
425
|
+
<span class="method-click-advice">click to toggle source</span>
|
426
|
+
</div>
|
427
|
+
|
428
|
+
|
429
|
+
<div class="method-description">
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
<div class="method-source-code" id="loaded_tests-source">
|
436
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 28</span>
|
437
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">loaded_tests</span>
|
438
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"\n-> Loading\n"</span>
|
439
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Loaded #{BigBench.benchmarks.size} benchmarks. Benchmark will take #{BigBench.duration} seconds"</span>
|
440
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
441
|
+
<span class="ruby-keyword">end</span></pre>
|
442
|
+
</div><!-- loaded_tests-source -->
|
443
|
+
|
444
|
+
</div>
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
</div><!-- loaded_tests-method -->
|
450
|
+
|
451
|
+
|
452
|
+
<div id="method-c-reset" class="method-detail ">
|
453
|
+
|
454
|
+
<div class="method-heading">
|
455
|
+
<span class="method-name">reset</span><span
|
456
|
+
class="method-args">()</span>
|
457
|
+
<span class="method-click-advice">click to toggle source</span>
|
458
|
+
</div>
|
459
|
+
|
460
|
+
|
461
|
+
<div class="method-description">
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
<div class="method-source-code" id="reset-source">
|
468
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 23</span>
|
469
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">reset</span>
|
470
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"-> Resetting everything."</span>
|
471
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
472
|
+
<span class="ruby-keyword">end</span></pre>
|
473
|
+
</div><!-- reset-source -->
|
474
|
+
|
475
|
+
</div>
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
</div><!-- reset-method -->
|
481
|
+
|
482
|
+
|
483
|
+
<div id="method-c-running_benchmarks" class="method-detail ">
|
484
|
+
|
485
|
+
<div class="method-heading">
|
486
|
+
<span class="method-name">running_benchmarks</span><span
|
487
|
+
class="method-args">()</span>
|
488
|
+
<span class="method-click-advice">click to toggle source</span>
|
489
|
+
</div>
|
490
|
+
|
491
|
+
|
492
|
+
<div class="method-description">
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
<div class="method-source-code" id="running_benchmarks-source">
|
499
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 34</span>
|
500
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">running_benchmarks</span>
|
501
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"\n-> Running\n"</span>
|
502
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Running #{BigBench.benchmarks.size} benchmarks."</span>
|
503
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
504
|
+
|
505
|
+
<span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span>{
|
506
|
+
<span class="ruby-identifier">loop</span> {
|
507
|
+
<span class="ruby-identifier">sleep</span>(<span class="ruby-value">1</span>)
|
508
|
+
<span class="ruby-identifier">progress</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@start</span>
|
509
|
+
<span class="ruby-identifier">remaining</span> = <span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">progress</span>
|
510
|
+
<span class="ruby-identifier">percent</span> = ((<span class="ruby-identifier">progress</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">duration</span>.<span class="ruby-identifier">to_f</span>).<span class="ruby-identifier">to_f</span> * <span class="ruby-value">100</span>).<span class="ruby-identifier">to_i</span>
|
511
|
+
<span class="ruby-identifier">print</span> <span class="ruby-node">"\r#{percent}% - #{progress.to_i} seconds elapsed. #{remaining.to_i} seconds remaining."</span>
|
512
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">percent</span> <span class="ruby-operator">></span> <span class="ruby-value">99</span>
|
513
|
+
<span class="ruby-identifier">print</span> <span class="ruby-string">"\r100% Done \n"</span>
|
514
|
+
<span class="ruby-keyword">break</span>
|
515
|
+
<span class="ruby-keyword">end</span>
|
516
|
+
}
|
517
|
+
}
|
518
|
+
<span class="ruby-keyword">end</span></pre>
|
519
|
+
</div><!-- running_benchmarks-source -->
|
520
|
+
|
521
|
+
</div>
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
</div><!-- running_benchmarks-method -->
|
527
|
+
|
528
|
+
|
529
|
+
<div id="method-c-running_bots_loop" class="method-detail ">
|
530
|
+
|
531
|
+
<div class="method-heading">
|
532
|
+
<span class="method-name">running_bots_loop</span><span
|
533
|
+
class="method-args">(bots)</span>
|
534
|
+
<span class="method-click-advice">click to toggle source</span>
|
535
|
+
</div>
|
536
|
+
|
537
|
+
|
538
|
+
<div class="method-description">
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
<div class="method-source-code" id="running_bots_loop-source">
|
545
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 89</span>
|
546
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">running_bots_loop</span>(<span class="ruby-identifier">bots</span>)
|
547
|
+
<span class="ruby-identifier">progress</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@start</span>
|
548
|
+
<span class="ruby-identifier">remaining</span> = <span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">progress</span>
|
549
|
+
<span class="ruby-identifier">percent</span> = ((<span class="ruby-identifier">progress</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">duration</span>.<span class="ruby-identifier">to_f</span>).<span class="ruby-identifier">to_f</span> * <span class="ruby-value">100</span>).<span class="ruby-identifier">to_i</span>
|
550
|
+
<span class="ruby-identifier">info</span> = <span class="ruby-string">" - Waiting for bots to finish"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">percent</span> <span class="ruby-operator">></span> <span class="ruby-value">100</span>
|
551
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
552
|
+
<span class="ruby-identifier">print</span> <span class="ruby-node">"\r#{percent}% - #{progress.to_i} seconds elapsed. #{remaining.to_i} seconds remaining. #{bots.size} Active Bots#{info} "</span>
|
553
|
+
<span class="ruby-keyword">end</span></pre>
|
554
|
+
</div><!-- running_bots_loop-source -->
|
555
|
+
|
556
|
+
</div>
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
</div><!-- running_bots_loop-method -->
|
562
|
+
|
563
|
+
|
564
|
+
<div id="method-c-start" class="method-detail ">
|
565
|
+
|
566
|
+
<div class="method-heading">
|
567
|
+
<span class="method-name">start</span><span
|
568
|
+
class="method-args">()</span>
|
569
|
+
<span class="method-click-advice">click to toggle source</span>
|
570
|
+
</div>
|
571
|
+
|
572
|
+
|
573
|
+
<div class="method-description">
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
<div class="method-source-code" id="start-source">
|
580
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 13</span>
|
581
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span>
|
582
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"-> Started BigBench at #{@start = Time.now}\n"</span>
|
583
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
584
|
+
<span class="ruby-keyword">end</span></pre>
|
585
|
+
</div><!-- start-source -->
|
586
|
+
|
587
|
+
</div>
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
|
592
|
+
</div><!-- start-method -->
|
593
|
+
|
594
|
+
|
595
|
+
<div id="method-c-starting_bots_loop" class="method-detail ">
|
596
|
+
|
597
|
+
<div class="method-heading">
|
598
|
+
<span class="method-name">starting_bots_loop</span><span
|
599
|
+
class="method-args">()</span>
|
600
|
+
<span class="method-click-advice">click to toggle source</span>
|
601
|
+
</div>
|
602
|
+
|
603
|
+
|
604
|
+
<div class="method-description">
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
<div class="method-source-code" id="starting_bots_loop-source">
|
611
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 84</span>
|
612
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">starting_bots_loop</span>
|
613
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"\n-> Running\n"</span>
|
614
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"Running benchmarks on bots."</span>
|
615
|
+
<span class="ruby-keyword">end</span></pre>
|
616
|
+
</div><!-- starting_bots_loop-source -->
|
617
|
+
|
618
|
+
</div>
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
</div><!-- starting_bots_loop-method -->
|
624
|
+
|
625
|
+
|
626
|
+
<div id="method-c-writing_trackings" class="method-detail ">
|
627
|
+
|
628
|
+
<div class="method-heading">
|
629
|
+
<span class="method-name">writing_trackings</span><span
|
630
|
+
class="method-args">(count)</span>
|
631
|
+
<span class="method-click-advice">click to toggle source</span>
|
632
|
+
</div>
|
633
|
+
|
634
|
+
|
635
|
+
<div class="method-description">
|
636
|
+
|
637
|
+
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
<div class="method-source-code" id="writing_trackings-source">
|
642
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 59</span>
|
643
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">writing_trackings</span>(<span class="ruby-identifier">count</span>)
|
644
|
+
<span class="ruby-identifier">target</span> = <span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">mode</span> <span class="ruby-operator">==</span> <span class="ruby-value">:bot</span> <span class="ruby-operator">?</span> <span class="ruby-string">'redis'</span> <span class="ruby-operator">:</span> <span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">output</span>
|
645
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"\n-> Writing\n"</span>
|
646
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Writing #{@trackings = count} trackings to #{target}."</span>
|
647
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
648
|
+
<span class="ruby-keyword">end</span></pre>
|
649
|
+
</div><!-- writing_trackings-source -->
|
650
|
+
|
651
|
+
</div>
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
</div><!-- writing_trackings-method -->
|
657
|
+
|
658
|
+
|
659
|
+
<div id="method-c-wrote_trackings" class="method-detail ">
|
660
|
+
|
661
|
+
<div class="method-heading">
|
662
|
+
<span class="method-name">wrote_trackings</span><span
|
663
|
+
class="method-args">(count)</span>
|
664
|
+
<span class="method-click-advice">click to toggle source</span>
|
665
|
+
</div>
|
666
|
+
|
667
|
+
|
668
|
+
<div class="method-description">
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
|
673
|
+
|
674
|
+
<div class="method-source-code" id="wrote_trackings-source">
|
675
|
+
<pre><span class="ruby-comment"># File lib/bigbench/output.rb, line 66</span>
|
676
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">wrote_trackings</span>(<span class="ruby-identifier">count</span>)
|
677
|
+
<span class="ruby-identifier">percent</span> = ((<span class="ruby-identifier">count</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@trackings</span>.<span class="ruby-identifier">to_f</span>).<span class="ruby-identifier">to_f</span> * <span class="ruby-value">100</span>).<span class="ruby-identifier">to_i</span>
|
678
|
+
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
|
679
|
+
<span class="ruby-identifier">print</span> <span class="ruby-node">"\r#{percent}%"</span>
|
680
|
+
<span class="ruby-keyword">end</span></pre>
|
681
|
+
</div><!-- wrote_trackings-source -->
|
682
|
+
|
683
|
+
</div>
|
684
|
+
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
</div><!-- wrote_trackings-method -->
|
689
|
+
|
690
|
+
|
691
|
+
</section><!-- public-class-method-details -->
|
692
|
+
|
693
|
+
</section><!-- 5Buntitled-5D -->
|
694
|
+
|
695
|
+
</div><!-- documentation -->
|
696
|
+
|
697
|
+
|
698
|
+
<footer id="validator-badges">
|
699
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
700
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
701
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
702
|
+
</footer>
|
703
|
+
|