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.
Files changed (92) hide show
  1. data/.gitignore +5 -0
  2. data/Gemfile +4 -0
  3. data/README.textile +81 -0
  4. data/Rakefile +10 -0
  5. data/bigbench.gemspec +29 -0
  6. data/bin/bigbench +6 -0
  7. data/doc/BigBench.html +631 -0
  8. data/doc/BigBench/Benchmark.html +328 -0
  9. data/doc/BigBench/Benchmark/Benchmark.html +431 -0
  10. data/doc/BigBench/Bot.html +233 -0
  11. data/doc/BigBench/Configuration.html +312 -0
  12. data/doc/BigBench/Configuration/Config.html +375 -0
  13. data/doc/BigBench/Configuration/InvalidOptions.html +217 -0
  14. data/doc/BigBench/Executor.html +252 -0
  15. data/doc/BigBench/Executor/InvalidCommand.html +222 -0
  16. data/doc/BigBench/Fragment.html +404 -0
  17. data/doc/BigBench/Fragment/Fragment.html +384 -0
  18. data/doc/BigBench/Output.html +703 -0
  19. data/doc/BigBench/Runner.html +222 -0
  20. data/doc/BigBench/Runner/NoBenchmarksDefined.html +217 -0
  21. data/doc/BigBench/Store.html +639 -0
  22. data/doc/BigBench/Tracker.html +179 -0
  23. data/doc/BigBench/Tracker/Tracker.html +273 -0
  24. data/doc/Float.html +217 -0
  25. data/doc/Gemfile.html +129 -0
  26. data/doc/Helpers.html +163 -0
  27. data/doc/Object.html +181 -0
  28. data/doc/Rakefile.html +136 -0
  29. data/doc/TestWebServer.html +247 -0
  30. data/doc/created.rid +31 -0
  31. data/doc/images/add.png +0 -0
  32. data/doc/images/brick.png +0 -0
  33. data/doc/images/brick_link.png +0 -0
  34. data/doc/images/bug.png +0 -0
  35. data/doc/images/bullet_black.png +0 -0
  36. data/doc/images/bullet_toggle_minus.png +0 -0
  37. data/doc/images/bullet_toggle_plus.png +0 -0
  38. data/doc/images/date.png +0 -0
  39. data/doc/images/delete.png +0 -0
  40. data/doc/images/find.png +0 -0
  41. data/doc/images/loadingAnimation.gif +0 -0
  42. data/doc/images/macFFBgHack.png +0 -0
  43. data/doc/images/package.png +0 -0
  44. data/doc/images/page_green.png +0 -0
  45. data/doc/images/page_white_text.png +0 -0
  46. data/doc/images/page_white_width.png +0 -0
  47. data/doc/images/plugin.png +0 -0
  48. data/doc/images/ruby.png +0 -0
  49. data/doc/images/tag_blue.png +0 -0
  50. data/doc/images/tag_green.png +0 -0
  51. data/doc/images/transparent.png +0 -0
  52. data/doc/images/wrench.png +0 -0
  53. data/doc/images/wrench_orange.png +0 -0
  54. data/doc/images/zoom.png +0 -0
  55. data/doc/index.html +122 -0
  56. data/doc/js/darkfish.js +153 -0
  57. data/doc/js/jquery.js +18 -0
  58. data/doc/js/navigation.js +142 -0
  59. data/doc/js/search.js +94 -0
  60. data/doc/js/search_index.js +1 -0
  61. data/doc/js/searcher.js +228 -0
  62. data/doc/lib/bigbench/help/executor_txt.html +145 -0
  63. data/doc/rdoc.css +543 -0
  64. data/doc/table_of_contents.html +263 -0
  65. data/lib/bigbench.rb +18 -0
  66. data/lib/bigbench/benchmark.rb +126 -0
  67. data/lib/bigbench/bot.rb +34 -0
  68. data/lib/bigbench/configuration.rb +109 -0
  69. data/lib/bigbench/executor.rb +131 -0
  70. data/lib/bigbench/float_extensions.rb +6 -0
  71. data/lib/bigbench/fragment.rb +119 -0
  72. data/lib/bigbench/help/executor.txt +17 -0
  73. data/lib/bigbench/initializers.rb +2 -0
  74. data/lib/bigbench/output.rb +116 -0
  75. data/lib/bigbench/runner.rb +52 -0
  76. data/lib/bigbench/store.rb +92 -0
  77. data/lib/bigbench/tracker.rb +79 -0
  78. data/lib/bigbench/version.rb +3 -0
  79. data/spec/benchmark_spec.rb +69 -0
  80. data/spec/bot_spec.rb +31 -0
  81. data/spec/configure_spec.rb +39 -0
  82. data/spec/executor_spec.rb +80 -0
  83. data/spec/fragment_spec.rb +110 -0
  84. data/spec/helpers.rb +19 -0
  85. data/spec/lib/test_web_server.rb +18 -0
  86. data/spec/runner_spec.rb +40 -0
  87. data/spec/store_spec.rb +72 -0
  88. data/spec/tests/local.rb +15 -0
  89. data/spec/tests/local_invalid.rb +9 -0
  90. data/spec/tracker_spec.rb +50 -0
  91. data/spec/webserver_spec.rb +35 -0
  92. metadata +220 -0
@@ -0,0 +1,222 @@
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::Runner - 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/runner.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-run-21">::run!</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::Runner</h1>
144
+
145
+ <div id="description" class="description">
146
+
147
+ <p>The runner runs all available benchmarks and returns as soon as all of them
148
+ are finished. Additionally it allows the loading of reciepts from files or
149
+ the redis storage.</p>
150
+
151
+ </div><!-- description -->
152
+
153
+
154
+
155
+
156
+ <section id="5Buntitled-5D" class="documentation-section">
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+ <!-- Methods -->
166
+
167
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
168
+ <h3 class="section-header">Public Class Methods</h3>
169
+
170
+
171
+ <div id="method-c-run-21" class="method-detail ">
172
+
173
+ <div class="method-heading">
174
+ <span class="method-name">run!</span><span
175
+ class="method-args">()</span>
176
+ <span class="method-click-advice">click to toggle source</span>
177
+ </div>
178
+
179
+
180
+ <div class="method-description">
181
+
182
+ <p>Runs all benchmarks</p>
183
+
184
+
185
+
186
+ <div class="method-source-code" id="run-21-source">
187
+ <pre><span class="ruby-comment"># File lib/bigbench/runner.rb, line 15</span>
188
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">run!</span>
189
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoBenchmarksDefined</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">benchmarks</span>.<span class="ruby-identifier">empty?</span>
190
+
191
+ <span class="ruby-comment"># Run all benchmarks</span>
192
+ <span class="ruby-ivar">@running_threads</span> = []
193
+ <span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">benchmarks</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">benchmark</span><span class="ruby-operator">|</span>
194
+ <span class="ruby-ivar">@running_threads</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span>{ <span class="ruby-identifier">benchmark</span>.<span class="ruby-identifier">run!</span> }
195
+ <span class="ruby-keyword">end</span>
196
+
197
+ <span class="ruby-comment"># Wait for them to finish</span>
198
+ <span class="ruby-ivar">@running_threads</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">thread</span><span class="ruby-operator">|</span> <span class="ruby-identifier">thread</span>.<span class="ruby-identifier">join</span> }
199
+ <span class="ruby-keyword">end</span></pre>
200
+ </div><!-- run-21-source -->
201
+
202
+ </div>
203
+
204
+
205
+
206
+
207
+ </div><!-- run-21-method -->
208
+
209
+
210
+ </section><!-- public-class-method-details -->
211
+
212
+ </section><!-- 5Buntitled-5D -->
213
+
214
+ </div><!-- documentation -->
215
+
216
+
217
+ <footer id="validator-badges">
218
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
219
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
220
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
221
+ </footer>
222
+
@@ -0,0 +1,217 @@
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::Runner::NoBenchmarksDefined - 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/runner.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">StandardError
63
+
64
+ </nav>
65
+
66
+
67
+ <!-- Method Quickref -->
68
+ <nav id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+ <li><a href="#method-i-message">#message</a>
74
+
75
+ </ul>
76
+ </nav>
77
+
78
+ </div>
79
+
80
+ <div id="project-metadata">
81
+ <nav id="fileindex-section" class="section project-section">
82
+ <h3 class="section-header">Pages</h3>
83
+
84
+ <ul>
85
+
86
+ <li class="file"><a href="../../Gemfile.html">Gemfile</a>
87
+
88
+ <li class="file"><a href="../../Rakefile.html">Rakefile</a>
89
+
90
+ <li class="file"><a href="../../lib/bigbench/help/executor_txt.html">executor</a>
91
+
92
+ </ul>
93
+ </nav>
94
+
95
+ <nav id="classindex-section" class="section project-section">
96
+ <h3 class="section-header">Class and Module Index</h3>
97
+
98
+ <ul class="link-list">
99
+
100
+ <li><a href="../../BigBench.html">BigBench</a>
101
+
102
+ <li><a href="../../BigBench/Benchmark.html">BigBench::Benchmark</a>
103
+
104
+ <li><a href="../../BigBench/Benchmark/Benchmark.html">BigBench::Benchmark::Benchmark</a>
105
+
106
+ <li><a href="../../BigBench/Bot.html">BigBench::Bot</a>
107
+
108
+ <li><a href="../../BigBench/Configuration.html">BigBench::Configuration</a>
109
+
110
+ <li><a href="../../BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
111
+
112
+ <li><a href="../../BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
113
+
114
+ <li><a href="../../BigBench/Executor.html">BigBench::Executor</a>
115
+
116
+ <li><a href="../../BigBench/Executor/InvalidCommand.html">BigBench::Executor::InvalidCommand</a>
117
+
118
+ <li><a href="../../BigBench/Fragment.html">BigBench::Fragment</a>
119
+
120
+ <li><a href="../../BigBench/Fragment/Fragment.html">BigBench::Fragment::Fragment</a>
121
+
122
+ <li><a href="../../BigBench/Output.html">BigBench::Output</a>
123
+
124
+ <li><a href="../../BigBench/Runner.html">BigBench::Runner</a>
125
+
126
+ <li><a href="../../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
127
+
128
+ <li><a href="../../BigBench/Store.html">BigBench::Store</a>
129
+
130
+ <li><a href="../../BigBench/Tracker.html">BigBench::Tracker</a>
131
+
132
+ <li><a href="../../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
133
+
134
+ <li><a href="../../Float.html">Float</a>
135
+
136
+ <li><a href="../../Helpers.html">Helpers</a>
137
+
138
+ <li><a href="../../Object.html">Object</a>
139
+
140
+ <li><a href="../../TestWebServer.html">TestWebServer</a>
141
+
142
+ </ul>
143
+ </nav>
144
+
145
+ </div>
146
+ </nav>
147
+
148
+ <div id="documentation">
149
+ <h1 class="class">class BigBench::Runner::NoBenchmarksDefined</h1>
150
+
151
+ <div id="description" class="description">
152
+
153
+ <p>Is thrown when no benchmarks are defined</p>
154
+
155
+ </div><!-- description -->
156
+
157
+
158
+
159
+
160
+ <section id="5Buntitled-5D" class="documentation-section">
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <!-- Methods -->
170
+
171
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
172
+ <h3 class="section-header">Public Instance Methods</h3>
173
+
174
+
175
+ <div id="method-i-message" class="method-detail ">
176
+
177
+ <div class="method-heading">
178
+ <span class="method-name">message</span><span
179
+ class="method-args">()</span>
180
+ <span class="method-click-advice">click to toggle source</span>
181
+ </div>
182
+
183
+
184
+ <div class="method-description">
185
+
186
+
187
+
188
+
189
+
190
+ <div class="method-source-code" id="message-source">
191
+ <pre><span class="ruby-comment"># File lib/bigbench/runner.rb, line 9</span>
192
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">message</span>
193
+ <span class="ruby-string">&quot;Sorry, I couldn't find any benchmarks!&quot;</span>
194
+ <span class="ruby-keyword">end</span></pre>
195
+ </div><!-- message-source -->
196
+
197
+ </div>
198
+
199
+
200
+
201
+
202
+ </div><!-- message-method -->
203
+
204
+
205
+ </section><!-- public-instance-method-details -->
206
+
207
+ </section><!-- 5Buntitled-5D -->
208
+
209
+ </div><!-- documentation -->
210
+
211
+
212
+ <footer id="validator-badges">
213
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
214
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
215
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
216
+ </footer>
217
+
@@ -0,0 +1,639 @@
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::Store - 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/store.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-add_tracking">::add_tracking</a>
68
+
69
+ <li><a href="#method-c-bot_is_working">::bot_is_working</a>
70
+
71
+ <li><a href="#method-c-bot_stopped_working">::bot_stopped_working</a>
72
+
73
+ <li><a href="#method-c-bots">::bots</a>
74
+
75
+ <li><a href="#method-c-count_trackings">::count_trackings</a>
76
+
77
+ <li><a href="#method-c-pop_tracking">::pop_tracking</a>
78
+
79
+ <li><a href="#method-c-reset-21">::reset!</a>
80
+
81
+ <li><a href="#method-c-running-3F">::running?</a>
82
+
83
+ <li><a href="#method-c-setup-21">::setup!</a>
84
+
85
+ <li><a href="#method-c-start">::start</a>
86
+
87
+ <li><a href="#method-c-stop">::stop</a>
88
+
89
+ <li><a href="#method-c-test">::test</a>
90
+
91
+ <li><a href="#method-c-test-3D">::test=</a>
92
+
93
+ </ul>
94
+ </nav>
95
+
96
+ </div>
97
+
98
+ <div id="project-metadata">
99
+ <nav id="fileindex-section" class="section project-section">
100
+ <h3 class="section-header">Pages</h3>
101
+
102
+ <ul>
103
+
104
+ <li class="file"><a href="../Gemfile.html">Gemfile</a>
105
+
106
+ <li class="file"><a href="../Rakefile.html">Rakefile</a>
107
+
108
+ <li class="file"><a href="../lib/bigbench/help/executor_txt.html">executor</a>
109
+
110
+ </ul>
111
+ </nav>
112
+
113
+ <nav id="classindex-section" class="section project-section">
114
+ <h3 class="section-header">Class and Module Index</h3>
115
+
116
+ <ul class="link-list">
117
+
118
+ <li><a href="../BigBench.html">BigBench</a>
119
+
120
+ <li><a href="../BigBench/Benchmark.html">BigBench::Benchmark</a>
121
+
122
+ <li><a href="../BigBench/Benchmark/Benchmark.html">BigBench::Benchmark::Benchmark</a>
123
+
124
+ <li><a href="../BigBench/Bot.html">BigBench::Bot</a>
125
+
126
+ <li><a href="../BigBench/Configuration.html">BigBench::Configuration</a>
127
+
128
+ <li><a href="../BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
129
+
130
+ <li><a href="../BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
131
+
132
+ <li><a href="../BigBench/Executor.html">BigBench::Executor</a>
133
+
134
+ <li><a href="../BigBench/Executor/InvalidCommand.html">BigBench::Executor::InvalidCommand</a>
135
+
136
+ <li><a href="../BigBench/Fragment.html">BigBench::Fragment</a>
137
+
138
+ <li><a href="../BigBench/Fragment/Fragment.html">BigBench::Fragment::Fragment</a>
139
+
140
+ <li><a href="../BigBench/Output.html">BigBench::Output</a>
141
+
142
+ <li><a href="../BigBench/Runner.html">BigBench::Runner</a>
143
+
144
+ <li><a href="../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
145
+
146
+ <li><a href="../BigBench/Store.html">BigBench::Store</a>
147
+
148
+ <li><a href="../BigBench/Tracker.html">BigBench::Tracker</a>
149
+
150
+ <li><a href="../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
151
+
152
+ <li><a href="../Float.html">Float</a>
153
+
154
+ <li><a href="../Helpers.html">Helpers</a>
155
+
156
+ <li><a href="../Object.html">Object</a>
157
+
158
+ <li><a href="../TestWebServer.html">TestWebServer</a>
159
+
160
+ </ul>
161
+ </nav>
162
+
163
+ </div>
164
+ </nav>
165
+
166
+ <div id="documentation">
167
+ <h1 class="module">module BigBench::Store</h1>
168
+
169
+ <div id="description" class="description">
170
+
171
+ <p>The store encapsulates the communication with the redis key-value store. To
172
+ the outside it looks like normal module methods would be called. It allows
173
+ the simple starting of a test on multiple bots with the latest test
174
+ reciept.</p>
175
+
176
+ </div><!-- description -->
177
+
178
+
179
+
180
+
181
+ <section id="5Buntitled-5D" class="documentation-section">
182
+
183
+
184
+
185
+
186
+
187
+ <!-- Constants -->
188
+ <section id="constants-list" class="section">
189
+ <h3 class="section-header">Constants</h3>
190
+ <dl>
191
+
192
+ <dt id="BOTS_KEY">BOTS_KEY
193
+
194
+ <dd class="description">
195
+
196
+
197
+ <dt id="RUNNING_KEY">RUNNING_KEY
198
+
199
+ <dd class="description">
200
+
201
+
202
+ <dt id="TEST_RECEIPT_KEY">TEST_RECEIPT_KEY
203
+
204
+ <dd class="description">
205
+
206
+
207
+ <dt id="TRACKINGS_KEY">TRACKINGS_KEY
208
+
209
+ <dd class="description">
210
+
211
+
212
+ </dl>
213
+ </section>
214
+
215
+
216
+
217
+
218
+ <!-- Methods -->
219
+
220
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
221
+ <h3 class="section-header">Public Class Methods</h3>
222
+
223
+
224
+ <div id="method-c-add_tracking" class="method-detail ">
225
+
226
+ <div class="method-heading">
227
+ <span class="method-name">add_tracking</span><span
228
+ class="method-args">(tracking)</span>
229
+ <span class="method-click-advice">click to toggle source</span>
230
+ </div>
231
+
232
+
233
+ <div class="method-description">
234
+
235
+ <p>Add a tracking to the trackings</p>
236
+
237
+
238
+
239
+ <div class="method-source-code" id="add_tracking-source">
240
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 77</span>
241
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">add_tracking</span>(<span class="ruby-identifier">tracking</span>)
242
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">rpush</span>(<span class="ruby-constant">TRACKINGS_KEY</span>, <span class="ruby-identifier">tracking</span>)
243
+ <span class="ruby-keyword">end</span></pre>
244
+ </div><!-- add_tracking-source -->
245
+
246
+ </div>
247
+
248
+
249
+
250
+
251
+ </div><!-- add_tracking-method -->
252
+
253
+
254
+ <div id="method-c-bot_is_working" class="method-detail ">
255
+
256
+ <div class="method-heading">
257
+ <span class="method-name">bot_is_working</span><span
258
+ class="method-args">(id)</span>
259
+ <span class="method-click-advice">click to toggle source</span>
260
+ </div>
261
+
262
+
263
+ <div class="method-description">
264
+
265
+ <p>Adds a bot to the currently working bots list</p>
266
+
267
+
268
+
269
+ <div class="method-source-code" id="bot_is_working-source">
270
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 62</span>
271
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">bot_is_working</span>(<span class="ruby-identifier">id</span>)
272
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">sadd</span>(<span class="ruby-constant">BOTS_KEY</span>, <span class="ruby-identifier">id</span>)
273
+ <span class="ruby-keyword">end</span></pre>
274
+ </div><!-- bot_is_working-source -->
275
+
276
+ </div>
277
+
278
+
279
+
280
+
281
+ </div><!-- bot_is_working-method -->
282
+
283
+
284
+ <div id="method-c-bot_stopped_working" class="method-detail ">
285
+
286
+ <div class="method-heading">
287
+ <span class="method-name">bot_stopped_working</span><span
288
+ class="method-args">(id)</span>
289
+ <span class="method-click-advice">click to toggle source</span>
290
+ </div>
291
+
292
+
293
+ <div class="method-description">
294
+
295
+ <p>Removes a bot to the currently working bots list</p>
296
+
297
+
298
+
299
+ <div class="method-source-code" id="bot_stopped_working-source">
300
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 67</span>
301
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">bot_stopped_working</span>(<span class="ruby-identifier">id</span>)
302
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">srem</span>(<span class="ruby-constant">BOTS_KEY</span>, <span class="ruby-identifier">id</span>)
303
+ <span class="ruby-keyword">end</span></pre>
304
+ </div><!-- bot_stopped_working-source -->
305
+
306
+ </div>
307
+
308
+
309
+
310
+
311
+ </div><!-- bot_stopped_working-method -->
312
+
313
+
314
+ <div id="method-c-bots" class="method-detail ">
315
+
316
+ <div class="method-heading">
317
+ <span class="method-name">bots</span><span
318
+ class="method-args">()</span>
319
+ <span class="method-click-advice">click to toggle source</span>
320
+ </div>
321
+
322
+
323
+ <div class="method-description">
324
+
325
+ <p>Shows all currently working bots</p>
326
+
327
+
328
+
329
+ <div class="method-source-code" id="bots-source">
330
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 72</span>
331
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">bots</span>
332
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">smembers</span>(<span class="ruby-constant">BOTS_KEY</span>)
333
+ <span class="ruby-keyword">end</span></pre>
334
+ </div><!-- bots-source -->
335
+
336
+ </div>
337
+
338
+
339
+
340
+
341
+ </div><!-- bots-method -->
342
+
343
+
344
+ <div id="method-c-count_trackings" class="method-detail ">
345
+
346
+ <div class="method-heading">
347
+ <span class="method-name">count_trackings</span><span
348
+ class="method-args">()</span>
349
+ <span class="method-click-advice">click to toggle source</span>
350
+ </div>
351
+
352
+
353
+ <div class="method-description">
354
+
355
+ <p>How many trackings are in the list</p>
356
+
357
+
358
+
359
+ <div class="method-source-code" id="count_trackings-source">
360
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 87</span>
361
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">count_trackings</span>
362
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">llen</span>(<span class="ruby-constant">TRACKINGS_KEY</span>)
363
+ <span class="ruby-keyword">end</span></pre>
364
+ </div><!-- count_trackings-source -->
365
+
366
+ </div>
367
+
368
+
369
+
370
+
371
+ </div><!-- count_trackings-method -->
372
+
373
+
374
+ <div id="method-c-pop_tracking" class="method-detail ">
375
+
376
+ <div class="method-heading">
377
+ <span class="method-name">pop_tracking</span><span
378
+ class="method-args">()</span>
379
+ <span class="method-click-advice">click to toggle source</span>
380
+ </div>
381
+
382
+
383
+ <div class="method-description">
384
+
385
+ <p>Pop a tracking from the beginning of the list</p>
386
+
387
+
388
+
389
+ <div class="method-source-code" id="pop_tracking-source">
390
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 82</span>
391
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">pop_tracking</span>
392
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">lpop</span>(<span class="ruby-constant">TRACKINGS_KEY</span>)
393
+ <span class="ruby-keyword">end</span></pre>
394
+ </div><!-- pop_tracking-source -->
395
+
396
+ </div>
397
+
398
+
399
+
400
+
401
+ </div><!-- pop_tracking-method -->
402
+
403
+
404
+ <div id="method-c-reset-21" class="method-detail ">
405
+
406
+ <div class="method-heading">
407
+ <span class="method-name">reset!</span><span
408
+ class="method-args">()</span>
409
+ <span class="method-click-advice">click to toggle source</span>
410
+ </div>
411
+
412
+
413
+ <div class="method-description">
414
+
415
+ <p>Deletes all <a href="../BigBench.html">BigBench</a> related keys on the
416
+ redis store</p>
417
+
418
+
419
+
420
+ <div class="method-source-code" id="reset-21-source">
421
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 23</span>
422
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">reset!</span>
423
+ <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">nil?</span>
424
+
425
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">del</span>(<span class="ruby-constant">TEST_RECEIPT_KEY</span>)
426
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">del</span>(<span class="ruby-constant">RUNNING_KEY</span>)
427
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">del</span>(<span class="ruby-constant">BOTS_KEY</span>)
428
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">del</span>(<span class="ruby-constant">TRACKINGS_KEY</span>)
429
+ <span class="ruby-keyword">end</span></pre>
430
+ </div><!-- reset-21-source -->
431
+
432
+ </div>
433
+
434
+
435
+
436
+
437
+ </div><!-- reset-21-method -->
438
+
439
+
440
+ <div id="method-c-running-3F" class="method-detail ">
441
+
442
+ <div class="method-heading">
443
+ <span class="method-name">running?</span><span
444
+ class="method-args">()</span>
445
+ <span class="method-click-advice">click to toggle source</span>
446
+ </div>
447
+
448
+
449
+ <div class="method-description">
450
+
451
+ <p>Returns true if a bot test has been started</p>
452
+
453
+
454
+
455
+ <div class="method-source-code" id="running-3F-source">
456
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 57</span>
457
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">running?</span>
458
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">RUNNING_KEY</span>) <span class="ruby-operator">==</span> <span class="ruby-string">&quot;1&quot;</span>
459
+ <span class="ruby-keyword">end</span></pre>
460
+ </div><!-- running-3F-source -->
461
+
462
+ </div>
463
+
464
+
465
+
466
+
467
+ </div><!-- running-3F-method -->
468
+
469
+
470
+ <div id="method-c-setup-21" class="method-detail ">
471
+
472
+ <div class="method-heading">
473
+ <span class="method-name">setup!</span><span
474
+ class="method-args">(url = "localhost:6379", password = nil)</span>
475
+ <span class="method-click-advice">click to toggle source</span>
476
+ </div>
477
+
478
+
479
+ <div class="method-description">
480
+
481
+ <p>Setup the redis storage. Default values are <code>localhost:6379</code> and
482
+ no password. This needs to be called for any bot test</p>
483
+
484
+
485
+
486
+ <div class="method-source-code" id="setup-21-source">
487
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 16</span>
488
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">setup!</span>(<span class="ruby-identifier">url</span> = <span class="ruby-string">&quot;localhost:6379&quot;</span>, <span class="ruby-identifier">password</span> = <span class="ruby-keyword">nil</span>)
489
+ <span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>(<span class="ruby-identifier">url</span>)
490
+ <span class="ruby-ivar">@redis</span> = <span class="ruby-operator">::</span><span class="ruby-constant">Redis</span>.<span class="ruby-identifier">new</span> <span class="ruby-value">:host</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">host</span>, <span class="ruby-value">:port</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">port</span>, <span class="ruby-value">:password</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">password</span>
491
+ <span class="ruby-keyword">true</span>
492
+ <span class="ruby-keyword">end</span></pre>
493
+ </div><!-- setup-21-source -->
494
+
495
+ </div>
496
+
497
+
498
+
499
+
500
+ </div><!-- setup-21-method -->
501
+
502
+
503
+ <div id="method-c-start" class="method-detail ">
504
+
505
+ <div class="method-heading">
506
+ <span class="method-name">start</span><span
507
+ class="method-args">()</span>
508
+ <span class="method-click-advice">click to toggle source</span>
509
+ </div>
510
+
511
+
512
+ <div class="method-description">
513
+
514
+ <p>Start the tests for all bots by setting the running key</p>
515
+
516
+
517
+
518
+ <div class="method-source-code" id="start-source">
519
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 47</span>
520
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span>
521
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">set</span>(<span class="ruby-constant">RUNNING_KEY</span>, <span class="ruby-string">&quot;1&quot;</span>)
522
+ <span class="ruby-keyword">end</span></pre>
523
+ </div><!-- start-source -->
524
+
525
+ </div>
526
+
527
+
528
+
529
+
530
+ </div><!-- start-method -->
531
+
532
+
533
+ <div id="method-c-stop" class="method-detail ">
534
+
535
+ <div class="method-heading">
536
+ <span class="method-name">stop</span><span
537
+ class="method-args">()</span>
538
+ <span class="method-click-advice">click to toggle source</span>
539
+ </div>
540
+
541
+
542
+ <div class="method-description">
543
+
544
+ <p>Stops the test for all bots by unsetting the running key</p>
545
+
546
+
547
+
548
+ <div class="method-source-code" id="stop-source">
549
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 52</span>
550
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">stop</span>
551
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">set</span>(<span class="ruby-constant">RUNNING_KEY</span>, <span class="ruby-string">&quot;0&quot;</span>)
552
+ <span class="ruby-keyword">end</span></pre>
553
+ </div><!-- stop-source -->
554
+
555
+ </div>
556
+
557
+
558
+
559
+
560
+ </div><!-- stop-method -->
561
+
562
+
563
+ <div id="method-c-test" class="method-detail ">
564
+
565
+ <div class="method-heading">
566
+ <span class="method-name">test</span><span
567
+ class="method-args">()</span>
568
+ <span class="method-click-advice">click to toggle source</span>
569
+ </div>
570
+
571
+
572
+ <div class="method-description">
573
+
574
+ <p>Gets the current test from the redis</p>
575
+
576
+
577
+
578
+ <div class="method-source-code" id="test-source">
579
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 42</span>
580
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">test</span>
581
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">TEST_RECEIPT_KEY</span>)
582
+ <span class="ruby-keyword">end</span></pre>
583
+ </div><!-- test-source -->
584
+
585
+ </div>
586
+
587
+
588
+
589
+
590
+ </div><!-- test-method -->
591
+
592
+
593
+ <div id="method-c-test-3D" class="method-detail ">
594
+
595
+ <div class="method-heading">
596
+ <span class="method-name">test=</span><span
597
+ class="method-args">(test)</span>
598
+ <span class="method-click-advice">click to toggle source</span>
599
+ </div>
600
+
601
+
602
+ <div class="method-description">
603
+
604
+ <p>Stores the current test receipt for all bots on the redis instance</p>
605
+
606
+
607
+
608
+ <div class="method-source-code" id="test-3D-source">
609
+ <pre><span class="ruby-comment"># File lib/bigbench/store.rb, line 33</span>
610
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">test=</span>(<span class="ruby-identifier">test</span>)
611
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">test</span>
612
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">set</span>(<span class="ruby-constant">TEST_RECEIPT_KEY</span>, <span class="ruby-identifier">test</span>)
613
+ <span class="ruby-keyword">else</span>
614
+ <span class="ruby-ivar">@redis</span>.<span class="ruby-identifier">del</span>(<span class="ruby-constant">TEST_RECEIPT_KEY</span>)
615
+ <span class="ruby-keyword">end</span>
616
+ <span class="ruby-keyword">end</span></pre>
617
+ </div><!-- test-3D-source -->
618
+
619
+ </div>
620
+
621
+
622
+
623
+
624
+ </div><!-- test-3D-method -->
625
+
626
+
627
+ </section><!-- public-class-method-details -->
628
+
629
+ </section><!-- 5Buntitled-5D -->
630
+
631
+ </div><!-- documentation -->
632
+
633
+
634
+ <footer id="validator-badges">
635
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
636
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
637
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
638
+ </footer>
639
+