bigbench 0.0.3 → 0.0.4
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/.DS_Store +0 -0
- data/README.textile +254 -4
- data/Rakefile +43 -9
- data/doc/Array.html +288 -0
- data/doc/BigBench.html +32 -6
- data/doc/BigBench/Benchmark.html +24 -0
- data/doc/BigBench/Benchmark/Benchmark.html +24 -0
- data/doc/BigBench/Benchmark/Looper.html +24 -0
- data/doc/BigBench/Bot.html +24 -0
- data/doc/BigBench/Configuration.html +24 -0
- data/doc/BigBench/Configuration/Config.html +24 -0
- data/doc/BigBench/Configuration/InvalidOptions.html +24 -0
- data/doc/BigBench/Executor.html +33 -3
- data/doc/BigBench/Executor/InvalidCommand.html +25 -1
- data/doc/BigBench/Fragment.html +24 -0
- data/doc/BigBench/Fragment/Fragment.html +24 -0
- data/doc/BigBench/Output.html +24 -0
- data/doc/BigBench/PostProcessor.html +33 -6
- data/doc/BigBench/PostProcessor/Environment.html +489 -2
- data/doc/BigBench/PostProcessor/Environment/Appearings.html +327 -0
- data/doc/BigBench/PostProcessor/Environment/AttributeCluster.html +275 -0
- data/doc/BigBench/PostProcessor/Environment/BenchmarkNotFound.html +293 -0
- data/doc/BigBench/PostProcessor/Environment/Cluster.html +387 -0
- data/doc/BigBench/PostProcessor/Environment/NormalDistribution.html +383 -0
- data/doc/BigBench/PostProcessor/Environment/PolynomialRegression.html +438 -0
- data/doc/BigBench/PostProcessor/Environment/Statistics.html +568 -0
- data/doc/BigBench/PostProcessor/Graphs.html +270 -0
- data/doc/BigBench/PostProcessor/Graphs/LineGraph.html +403 -0
- data/doc/BigBench/PostProcessor/Graphs/PieGraph.html +396 -0
- data/doc/BigBench/PostProcessor/InvalidProcessor.html +25 -1
- data/doc/BigBench/PostProcessor/Processor.html +59 -7
- data/doc/BigBench/PostProcessor/Statistics.html +26 -2
- data/doc/BigBench/PostProcessor/Test.html +26 -2
- data/doc/BigBench/Runner.html +24 -0
- data/doc/BigBench/Runner/NoBenchmarksDefined.html +24 -0
- data/doc/BigBench/Store.html +24 -0
- data/doc/BigBench/Tracker.html +24 -0
- data/doc/BigBench/Tracker/Tracker.html +24 -0
- data/doc/EventMachineLoop.html +24 -0
- data/doc/Float.html +24 -0
- data/doc/Gemfile.html +24 -0
- data/doc/Helpers.html +78 -0
- data/doc/Object.html +29 -0
- data/doc/README_rdoc.html +803 -0
- data/doc/Rakefile.html +66 -10
- data/doc/created.rid +46 -40
- data/doc/index.html +667 -1
- data/doc/js/search_index.js +1 -1
- data/doc/lib/bigbench/help/executor_txt.html +32 -2
- data/doc/rdoc.css +4 -0
- data/doc/table_of_contents.html +179 -23
- data/doc/test_rdoc.html +159 -0
- data/lib/bigbench.rb +2 -0
- data/lib/bigbench/executor.rb +17 -1
- data/lib/bigbench/help/executor.txt +5 -0
- data/lib/bigbench/post_processor.rb +16 -32
- data/lib/bigbench/post_processor/environment.rb +525 -0
- data/lib/bigbench/post_processor/graphs.rb +209 -0
- data/lib/bigbench/post_processor/statistics.rb +29 -49
- data/lib/bigbench/version.rb +1 -1
- data/spec/executor_spec.rb +35 -0
- data/spec/helpers.rb +15 -1
- data/spec/post_processor_spec.rb +19 -4
- data/spec/post_processors/environment_spec.rb +412 -0
- data/spec/post_processors/graphs_spec.rb +23 -0
- data/spec/post_processors/statistics_spec.rb +3 -2
- data/spec/tests/local.rb +1 -1
- data/spec/tests/sample_results_big.ljson +51925 -0
- data/spec/tests/sample_results_small.ljson +3875 -0
- data/spec/tests/with_post_processor.ljson +43 -0
- data/spec/tests/with_post_processor.rb +12 -0
- data/spec/tmp/.DS_Store +0 -0
- data/spec/tracker_spec.rb +8 -8
- metadata +61 -101
@@ -85,6 +85,8 @@
|
|
85
85
|
|
86
86
|
<li class="file"><a href="../../Gemfile.html">Gemfile</a>
|
87
87
|
|
88
|
+
<li class="file"><a href="../../README_rdoc.html">README</a>
|
89
|
+
|
88
90
|
<li class="file"><a href="../../Rakefile.html">Rakefile</a>
|
89
91
|
|
90
92
|
<li class="file"><a href="../../lib/bigbench/help/executor_txt.html">executor</a>
|
@@ -127,6 +129,26 @@
|
|
127
129
|
|
128
130
|
<li><a href="../../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
129
131
|
|
132
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
133
|
+
|
134
|
+
<li><a href="../../BigBench/PostProcessor/Environment/AttributeCluster.html">BigBench::PostProcessor::Environment::AttributeCluster</a>
|
135
|
+
|
136
|
+
<li><a href="../../BigBench/PostProcessor/Environment/BenchmarkNotFound.html">BigBench::PostProcessor::Environment::BenchmarkNotFound</a>
|
137
|
+
|
138
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Cluster.html">BigBench::PostProcessor::Environment::Cluster</a>
|
139
|
+
|
140
|
+
<li><a href="../../BigBench/PostProcessor/Environment/NormalDistribution.html">BigBench::PostProcessor::Environment::NormalDistribution</a>
|
141
|
+
|
142
|
+
<li><a href="../../BigBench/PostProcessor/Environment/PolynomialRegression.html">BigBench::PostProcessor::Environment::PolynomialRegression</a>
|
143
|
+
|
144
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Statistics.html">BigBench::PostProcessor::Environment::Statistics</a>
|
145
|
+
|
146
|
+
<li><a href="../../BigBench/PostProcessor/Graphs.html">BigBench::PostProcessor::Graphs</a>
|
147
|
+
|
148
|
+
<li><a href="../../BigBench/PostProcessor/Graphs/LineGraph.html">BigBench::PostProcessor::Graphs::LineGraph</a>
|
149
|
+
|
150
|
+
<li><a href="../../BigBench/PostProcessor/Graphs/PieGraph.html">BigBench::PostProcessor::Graphs::PieGraph</a>
|
151
|
+
|
130
152
|
<li><a href="../../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
131
153
|
|
132
154
|
<li><a href="../../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
@@ -145,6 +167,8 @@
|
|
145
167
|
|
146
168
|
<li><a href="../../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
|
147
169
|
|
170
|
+
<li><a href="../../Array.html">Array</a>
|
171
|
+
|
148
172
|
<li><a href="../../EventMachineLoop.html">EventMachineLoop</a>
|
149
173
|
|
150
174
|
<li><a href="../../Float.html">Float</a>
|
@@ -202,7 +226,7 @@
|
|
202
226
|
|
203
227
|
|
204
228
|
<div class="method-source-code" id="message-source">
|
205
|
-
<pre><span class="ruby-comment"># File lib/bigbench/executor.rb, line
|
229
|
+
<pre><span class="ruby-comment"># File lib/bigbench/executor.rb, line 20</span>
|
206
230
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">message</span>
|
207
231
|
<span class="ruby-identifier">puts</span> <span class="ruby-string">"\n\n"</span>
|
208
232
|
<span class="ruby-identifier">puts</span> <span class="ruby-string">"Sorry, could not compile your command. Please enter one of the following commands:\n\n"</span>
|
data/doc/BigBench/Fragment.html
CHANGED
@@ -89,6 +89,8 @@
|
|
89
89
|
|
90
90
|
<li class="file"><a href="../Gemfile.html">Gemfile</a>
|
91
91
|
|
92
|
+
<li class="file"><a href="../README_rdoc.html">README</a>
|
93
|
+
|
92
94
|
<li class="file"><a href="../Rakefile.html">Rakefile</a>
|
93
95
|
|
94
96
|
<li class="file"><a href="../lib/bigbench/help/executor_txt.html">executor</a>
|
@@ -131,6 +133,26 @@
|
|
131
133
|
|
132
134
|
<li><a href="../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
133
135
|
|
136
|
+
<li><a href="../BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
137
|
+
|
138
|
+
<li><a href="../BigBench/PostProcessor/Environment/AttributeCluster.html">BigBench::PostProcessor::Environment::AttributeCluster</a>
|
139
|
+
|
140
|
+
<li><a href="../BigBench/PostProcessor/Environment/BenchmarkNotFound.html">BigBench::PostProcessor::Environment::BenchmarkNotFound</a>
|
141
|
+
|
142
|
+
<li><a href="../BigBench/PostProcessor/Environment/Cluster.html">BigBench::PostProcessor::Environment::Cluster</a>
|
143
|
+
|
144
|
+
<li><a href="../BigBench/PostProcessor/Environment/NormalDistribution.html">BigBench::PostProcessor::Environment::NormalDistribution</a>
|
145
|
+
|
146
|
+
<li><a href="../BigBench/PostProcessor/Environment/PolynomialRegression.html">BigBench::PostProcessor::Environment::PolynomialRegression</a>
|
147
|
+
|
148
|
+
<li><a href="../BigBench/PostProcessor/Environment/Statistics.html">BigBench::PostProcessor::Environment::Statistics</a>
|
149
|
+
|
150
|
+
<li><a href="../BigBench/PostProcessor/Graphs.html">BigBench::PostProcessor::Graphs</a>
|
151
|
+
|
152
|
+
<li><a href="../BigBench/PostProcessor/Graphs/LineGraph.html">BigBench::PostProcessor::Graphs::LineGraph</a>
|
153
|
+
|
154
|
+
<li><a href="../BigBench/PostProcessor/Graphs/PieGraph.html">BigBench::PostProcessor::Graphs::PieGraph</a>
|
155
|
+
|
134
156
|
<li><a href="../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
135
157
|
|
136
158
|
<li><a href="../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
@@ -149,6 +171,8 @@
|
|
149
171
|
|
150
172
|
<li><a href="../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
|
151
173
|
|
174
|
+
<li><a href="../Array.html">Array</a>
|
175
|
+
|
152
176
|
<li><a href="../EventMachineLoop.html">EventMachineLoop</a>
|
153
177
|
|
154
178
|
<li><a href="../Float.html">Float</a>
|
@@ -89,6 +89,8 @@
|
|
89
89
|
|
90
90
|
<li class="file"><a href="../../Gemfile.html">Gemfile</a>
|
91
91
|
|
92
|
+
<li class="file"><a href="../../README_rdoc.html">README</a>
|
93
|
+
|
92
94
|
<li class="file"><a href="../../Rakefile.html">Rakefile</a>
|
93
95
|
|
94
96
|
<li class="file"><a href="../../lib/bigbench/help/executor_txt.html">executor</a>
|
@@ -131,6 +133,26 @@
|
|
131
133
|
|
132
134
|
<li><a href="../../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
133
135
|
|
136
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
137
|
+
|
138
|
+
<li><a href="../../BigBench/PostProcessor/Environment/AttributeCluster.html">BigBench::PostProcessor::Environment::AttributeCluster</a>
|
139
|
+
|
140
|
+
<li><a href="../../BigBench/PostProcessor/Environment/BenchmarkNotFound.html">BigBench::PostProcessor::Environment::BenchmarkNotFound</a>
|
141
|
+
|
142
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Cluster.html">BigBench::PostProcessor::Environment::Cluster</a>
|
143
|
+
|
144
|
+
<li><a href="../../BigBench/PostProcessor/Environment/NormalDistribution.html">BigBench::PostProcessor::Environment::NormalDistribution</a>
|
145
|
+
|
146
|
+
<li><a href="../../BigBench/PostProcessor/Environment/PolynomialRegression.html">BigBench::PostProcessor::Environment::PolynomialRegression</a>
|
147
|
+
|
148
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Statistics.html">BigBench::PostProcessor::Environment::Statistics</a>
|
149
|
+
|
150
|
+
<li><a href="../../BigBench/PostProcessor/Graphs.html">BigBench::PostProcessor::Graphs</a>
|
151
|
+
|
152
|
+
<li><a href="../../BigBench/PostProcessor/Graphs/LineGraph.html">BigBench::PostProcessor::Graphs::LineGraph</a>
|
153
|
+
|
154
|
+
<li><a href="../../BigBench/PostProcessor/Graphs/PieGraph.html">BigBench::PostProcessor::Graphs::PieGraph</a>
|
155
|
+
|
134
156
|
<li><a href="../../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
135
157
|
|
136
158
|
<li><a href="../../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
@@ -149,6 +171,8 @@
|
|
149
171
|
|
150
172
|
<li><a href="../../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
|
151
173
|
|
174
|
+
<li><a href="../../Array.html">Array</a>
|
175
|
+
|
152
176
|
<li><a href="../../EventMachineLoop.html">EventMachineLoop</a>
|
153
177
|
|
154
178
|
<li><a href="../../Float.html">Float</a>
|
data/doc/BigBench/Output.html
CHANGED
@@ -107,6 +107,8 @@
|
|
107
107
|
|
108
108
|
<li class="file"><a href="../Gemfile.html">Gemfile</a>
|
109
109
|
|
110
|
+
<li class="file"><a href="../README_rdoc.html">README</a>
|
111
|
+
|
110
112
|
<li class="file"><a href="../Rakefile.html">Rakefile</a>
|
111
113
|
|
112
114
|
<li class="file"><a href="../lib/bigbench/help/executor_txt.html">executor</a>
|
@@ -149,6 +151,26 @@
|
|
149
151
|
|
150
152
|
<li><a href="../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
151
153
|
|
154
|
+
<li><a href="../BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
155
|
+
|
156
|
+
<li><a href="../BigBench/PostProcessor/Environment/AttributeCluster.html">BigBench::PostProcessor::Environment::AttributeCluster</a>
|
157
|
+
|
158
|
+
<li><a href="../BigBench/PostProcessor/Environment/BenchmarkNotFound.html">BigBench::PostProcessor::Environment::BenchmarkNotFound</a>
|
159
|
+
|
160
|
+
<li><a href="../BigBench/PostProcessor/Environment/Cluster.html">BigBench::PostProcessor::Environment::Cluster</a>
|
161
|
+
|
162
|
+
<li><a href="../BigBench/PostProcessor/Environment/NormalDistribution.html">BigBench::PostProcessor::Environment::NormalDistribution</a>
|
163
|
+
|
164
|
+
<li><a href="../BigBench/PostProcessor/Environment/PolynomialRegression.html">BigBench::PostProcessor::Environment::PolynomialRegression</a>
|
165
|
+
|
166
|
+
<li><a href="../BigBench/PostProcessor/Environment/Statistics.html">BigBench::PostProcessor::Environment::Statistics</a>
|
167
|
+
|
168
|
+
<li><a href="../BigBench/PostProcessor/Graphs.html">BigBench::PostProcessor::Graphs</a>
|
169
|
+
|
170
|
+
<li><a href="../BigBench/PostProcessor/Graphs/LineGraph.html">BigBench::PostProcessor::Graphs::LineGraph</a>
|
171
|
+
|
172
|
+
<li><a href="../BigBench/PostProcessor/Graphs/PieGraph.html">BigBench::PostProcessor::Graphs::PieGraph</a>
|
173
|
+
|
152
174
|
<li><a href="../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
153
175
|
|
154
176
|
<li><a href="../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
@@ -167,6 +189,8 @@
|
|
167
189
|
|
168
190
|
<li><a href="../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
|
169
191
|
|
192
|
+
<li><a href="../Array.html">Array</a>
|
193
|
+
|
170
194
|
<li><a href="../EventMachineLoop.html">EventMachineLoop</a>
|
171
195
|
|
172
196
|
<li><a href="../Float.html">Float</a>
|
@@ -47,6 +47,8 @@
|
|
47
47
|
<nav id="file-list-section" class="section">
|
48
48
|
<h3 class="section-header">Defined In</h3>
|
49
49
|
<ul>
|
50
|
+
<li>lib/bigbench/post_processor/environment.rb
|
51
|
+
<li>lib/bigbench/post_processor/graphs.rb
|
50
52
|
<li>lib/bigbench/post_processor/statistics.rb
|
51
53
|
<li>lib/bigbench/post_processor.rb
|
52
54
|
</ul>
|
@@ -86,6 +88,8 @@
|
|
86
88
|
|
87
89
|
<li class="file"><a href="../Gemfile.html">Gemfile</a>
|
88
90
|
|
91
|
+
<li class="file"><a href="../README_rdoc.html">README</a>
|
92
|
+
|
89
93
|
<li class="file"><a href="../Rakefile.html">Rakefile</a>
|
90
94
|
|
91
95
|
<li class="file"><a href="../lib/bigbench/help/executor_txt.html">executor</a>
|
@@ -128,6 +132,26 @@
|
|
128
132
|
|
129
133
|
<li><a href="../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
130
134
|
|
135
|
+
<li><a href="../BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
136
|
+
|
137
|
+
<li><a href="../BigBench/PostProcessor/Environment/AttributeCluster.html">BigBench::PostProcessor::Environment::AttributeCluster</a>
|
138
|
+
|
139
|
+
<li><a href="../BigBench/PostProcessor/Environment/BenchmarkNotFound.html">BigBench::PostProcessor::Environment::BenchmarkNotFound</a>
|
140
|
+
|
141
|
+
<li><a href="../BigBench/PostProcessor/Environment/Cluster.html">BigBench::PostProcessor::Environment::Cluster</a>
|
142
|
+
|
143
|
+
<li><a href="../BigBench/PostProcessor/Environment/NormalDistribution.html">BigBench::PostProcessor::Environment::NormalDistribution</a>
|
144
|
+
|
145
|
+
<li><a href="../BigBench/PostProcessor/Environment/PolynomialRegression.html">BigBench::PostProcessor::Environment::PolynomialRegression</a>
|
146
|
+
|
147
|
+
<li><a href="../BigBench/PostProcessor/Environment/Statistics.html">BigBench::PostProcessor::Environment::Statistics</a>
|
148
|
+
|
149
|
+
<li><a href="../BigBench/PostProcessor/Graphs.html">BigBench::PostProcessor::Graphs</a>
|
150
|
+
|
151
|
+
<li><a href="../BigBench/PostProcessor/Graphs/LineGraph.html">BigBench::PostProcessor::Graphs::LineGraph</a>
|
152
|
+
|
153
|
+
<li><a href="../BigBench/PostProcessor/Graphs/PieGraph.html">BigBench::PostProcessor::Graphs::PieGraph</a>
|
154
|
+
|
131
155
|
<li><a href="../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
132
156
|
|
133
157
|
<li><a href="../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
@@ -146,6 +170,8 @@
|
|
146
170
|
|
147
171
|
<li><a href="../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
|
148
172
|
|
173
|
+
<li><a href="../Array.html">Array</a>
|
174
|
+
|
149
175
|
<li><a href="../EventMachineLoop.html">EventMachineLoop</a>
|
150
176
|
|
151
177
|
<li><a href="../Float.html">Float</a>
|
@@ -247,7 +273,7 @@ returns a hash with a single tracking of the following form:</p>
|
|
247
273
|
|
248
274
|
<div class="method-heading">
|
249
275
|
<span class="method-name">add</span><span
|
250
|
-
class="method-args">(processor = nil, &block)</span>
|
276
|
+
class="method-args">(processor = nil, options = nil, &block)</span>
|
251
277
|
<span class="method-click-advice">click to toggle source</span>
|
252
278
|
</div>
|
253
279
|
|
@@ -259,9 +285,9 @@ returns a hash with a single tracking of the following form:</p>
|
|
259
285
|
|
260
286
|
|
261
287
|
<div class="method-source-code" id="add-source">
|
262
|
-
<pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line
|
263
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">processor</span> = <span class="ruby-keyword">nil</span>, &<span class="ruby-identifier">block</span>)
|
264
|
-
<span class="ruby-ivar">@processors</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Processor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">processor</span>, &<span class="ruby-identifier">block</span>)
|
288
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line 104</span>
|
289
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">processor</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">options</span> = <span class="ruby-keyword">nil</span>, &<span class="ruby-identifier">block</span>)
|
290
|
+
<span class="ruby-ivar">@processors</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Processor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">processor</span>, <span class="ruby-identifier">options</span>, &<span class="ruby-identifier">block</span>)
|
265
291
|
<span class="ruby-keyword">end</span></pre>
|
266
292
|
</div><!-- add-source -->
|
267
293
|
|
@@ -289,7 +315,7 @@ returns a hash with a single tracking of the following form:</p>
|
|
289
315
|
|
290
316
|
|
291
317
|
<div class="method-source-code" id="all-source">
|
292
|
-
<pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line
|
318
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line 109</span>
|
293
319
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">all</span>
|
294
320
|
<span class="ruby-ivar">@processors</span>
|
295
321
|
<span class="ruby-keyword">end</span></pre>
|
@@ -319,9 +345,10 @@ returns a hash with a single tracking of the following form:</p>
|
|
319
345
|
|
320
346
|
|
321
347
|
<div class="method-source-code" id="reset-21-source">
|
322
|
-
<pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line
|
348
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line 114</span>
|
323
349
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">reset!</span>
|
324
350
|
<span class="ruby-ivar">@processors</span> = []
|
351
|
+
<span class="ruby-constant">Environment</span>.<span class="ruby-identifier">reset!</span>
|
325
352
|
<span class="ruby-keyword">end</span></pre>
|
326
353
|
</div><!-- reset-21-source -->
|
327
354
|
|
@@ -47,7 +47,7 @@
|
|
47
47
|
<nav id="file-list-section" class="section">
|
48
48
|
<h3 class="section-header">Defined In</h3>
|
49
49
|
<ul>
|
50
|
-
<li>lib/bigbench/post_processor.rb
|
50
|
+
<li>lib/bigbench/post_processor/environment.rb
|
51
51
|
</ul>
|
52
52
|
</nav>
|
53
53
|
|
@@ -64,8 +64,28 @@
|
|
64
64
|
|
65
65
|
<ul class="link-list">
|
66
66
|
|
67
|
+
<li><a href="#method-c-reset-21">::reset!</a>
|
68
|
+
|
69
|
+
<li><a href="#method-i-appearing">#appearing</a>
|
70
|
+
|
71
|
+
<li><a href="#method-i-cluster">#cluster</a>
|
72
|
+
|
73
|
+
<li><a href="#method-i-each_benchmark">#each_benchmark</a>
|
74
|
+
|
67
75
|
<li><a href="#method-i-each_tracking">#each_tracking</a>
|
68
76
|
|
77
|
+
<li><a href="#method-i-normal_distribution">#normal_distribution</a>
|
78
|
+
|
79
|
+
<li><a href="#method-i-polynomial_regression">#polynomial_regression</a>
|
80
|
+
|
81
|
+
<li><a href="#method-i-scope">#scope</a>
|
82
|
+
|
83
|
+
<li><a href="#method-i-scope_to_benchmark">#scope_to_benchmark</a>
|
84
|
+
|
85
|
+
<li><a href="#method-i-statistics">#statistics</a>
|
86
|
+
|
87
|
+
<li><a href="#method-i-trackings">#trackings</a>
|
88
|
+
|
69
89
|
</ul>
|
70
90
|
</nav>
|
71
91
|
|
@@ -79,6 +99,8 @@
|
|
79
99
|
|
80
100
|
<li class="file"><a href="../../Gemfile.html">Gemfile</a>
|
81
101
|
|
102
|
+
<li class="file"><a href="../../README_rdoc.html">README</a>
|
103
|
+
|
82
104
|
<li class="file"><a href="../../Rakefile.html">Rakefile</a>
|
83
105
|
|
84
106
|
<li class="file"><a href="../../lib/bigbench/help/executor_txt.html">executor</a>
|
@@ -121,6 +143,26 @@
|
|
121
143
|
|
122
144
|
<li><a href="../../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
123
145
|
|
146
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
147
|
+
|
148
|
+
<li><a href="../../BigBench/PostProcessor/Environment/AttributeCluster.html">BigBench::PostProcessor::Environment::AttributeCluster</a>
|
149
|
+
|
150
|
+
<li><a href="../../BigBench/PostProcessor/Environment/BenchmarkNotFound.html">BigBench::PostProcessor::Environment::BenchmarkNotFound</a>
|
151
|
+
|
152
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Cluster.html">BigBench::PostProcessor::Environment::Cluster</a>
|
153
|
+
|
154
|
+
<li><a href="../../BigBench/PostProcessor/Environment/NormalDistribution.html">BigBench::PostProcessor::Environment::NormalDistribution</a>
|
155
|
+
|
156
|
+
<li><a href="../../BigBench/PostProcessor/Environment/PolynomialRegression.html">BigBench::PostProcessor::Environment::PolynomialRegression</a>
|
157
|
+
|
158
|
+
<li><a href="../../BigBench/PostProcessor/Environment/Statistics.html">BigBench::PostProcessor::Environment::Statistics</a>
|
159
|
+
|
160
|
+
<li><a href="../../BigBench/PostProcessor/Graphs.html">BigBench::PostProcessor::Graphs</a>
|
161
|
+
|
162
|
+
<li><a href="../../BigBench/PostProcessor/Graphs/LineGraph.html">BigBench::PostProcessor::Graphs::LineGraph</a>
|
163
|
+
|
164
|
+
<li><a href="../../BigBench/PostProcessor/Graphs/PieGraph.html">BigBench::PostProcessor::Graphs::PieGraph</a>
|
165
|
+
|
124
166
|
<li><a href="../../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
125
167
|
|
126
168
|
<li><a href="../../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
@@ -139,6 +181,8 @@
|
|
139
181
|
|
140
182
|
<li><a href="../../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
|
141
183
|
|
184
|
+
<li><a href="../../Array.html">Array</a>
|
185
|
+
|
142
186
|
<li><a href="../../EventMachineLoop.html">EventMachineLoop</a>
|
143
187
|
|
144
188
|
<li><a href="../../Float.html">Float</a>
|
@@ -178,10 +222,186 @@ predefined post processors</p>
|
|
178
222
|
|
179
223
|
<!-- Methods -->
|
180
224
|
|
225
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
226
|
+
<h3 class="section-header">Public Class Methods</h3>
|
227
|
+
|
228
|
+
|
229
|
+
<div id="method-c-reset-21" class="method-detail ">
|
230
|
+
|
231
|
+
<div class="method-heading">
|
232
|
+
<span class="method-name">reset!</span><span
|
233
|
+
class="method-args">()</span>
|
234
|
+
<span class="method-click-advice">click to toggle source</span>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
|
238
|
+
<div class="method-description">
|
239
|
+
|
240
|
+
<p>Resets the whole post processor environment</p>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
<div class="method-source-code" id="reset-21-source">
|
245
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor/environment.rb, line 9</span>
|
246
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">reset!</span>
|
247
|
+
<span class="ruby-identifier">@@clusters</span>, <span class="ruby-identifier">@@statistics</span>, <span class="ruby-identifier">@@normal_distribution</span>, <span class="ruby-identifier">@@regressions</span>, <span class="ruby-identifier">@@appearings</span> = {}, {}, {}, {}, {}
|
248
|
+
<span class="ruby-identifier">@@trackings</span> = []
|
249
|
+
<span class="ruby-identifier">@@scope</span> = <span class="ruby-value">:all</span>
|
250
|
+
<span class="ruby-keyword">end</span></pre>
|
251
|
+
</div><!-- reset-21-source -->
|
252
|
+
|
253
|
+
</div>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
</div><!-- reset-21-method -->
|
259
|
+
|
260
|
+
|
261
|
+
</section><!-- public-class-method-details -->
|
262
|
+
|
181
263
|
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
182
264
|
<h3 class="section-header">Public Instance Methods</h3>
|
183
265
|
|
184
266
|
|
267
|
+
<div id="method-i-appearing" class="method-detail ">
|
268
|
+
|
269
|
+
<div class="method-heading">
|
270
|
+
<span class="method-name">appearing</span><span
|
271
|
+
class="method-args">(timebase = 1.second)</span>
|
272
|
+
<span class="method-click-advice">click to toggle source</span>
|
273
|
+
</div>
|
274
|
+
|
275
|
+
|
276
|
+
<div class="method-description">
|
277
|
+
|
278
|
+
<p>Returns an array of appearing attributes in the selected tracking scope.</p>
|
279
|
+
|
280
|
+
<pre class="ruby"><span class="ruby-identifier">appearing</span>.<span class="ruby-identifier">statuses</span> <span class="ruby-comment"># => [200, 404]</span>
|
281
|
+
<span class="ruby-identifier">appearing</span>.<span class="ruby-identifier">methods</span> <span class="ruby-comment"># => ["get", "post"]</span>
|
282
|
+
<span class="ruby-identifier">appearing</span>.<span class="ruby-identifier">paths</span> <span class="ruby-comment"># => ["/", "/basic/auth"</span>
|
283
|
+
</pre>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
<div class="method-source-code" id="appearing-source">
|
288
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor/environment.rb, line 143</span>
|
289
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">appearing</span>(<span class="ruby-identifier">timebase</span> = <span class="ruby-value">1</span>.<span class="ruby-identifier">second</span>)
|
290
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">@@appearings</span>[<span class="ruby-identifier">scope</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">@@appearings</span>[<span class="ruby-identifier">scope</span>].<span class="ruby-identifier">nil?</span>
|
291
|
+
|
292
|
+
<span class="ruby-identifier">@@appearings</span>[<span class="ruby-identifier">scope</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">Appearings</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">scope</span>)
|
293
|
+
<span class="ruby-keyword">end</span></pre>
|
294
|
+
</div><!-- appearing-source -->
|
295
|
+
|
296
|
+
</div>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
</div><!-- appearing-method -->
|
302
|
+
|
303
|
+
|
304
|
+
<div id="method-i-cluster" class="method-detail ">
|
305
|
+
|
306
|
+
<div class="method-heading">
|
307
|
+
<span class="method-name">cluster</span><span
|
308
|
+
class="method-args">(timebase = 1.second, extra_scope = nil)</span>
|
309
|
+
<span class="method-click-advice">click to toggle source</span>
|
310
|
+
</div>
|
311
|
+
|
312
|
+
|
313
|
+
<div class="method-description">
|
314
|
+
|
315
|
+
<p>Returns a clustered overview of all trackings. By default the trackings are
|
316
|
+
clustered by second, but you can also specify any ammount of seconds to
|
317
|
+
group together. A cluster then has the following methods:</p>
|
318
|
+
|
319
|
+
<pre class="ruby"><span class="ruby-comment"># Duration was 120 seconds</span>
|
320
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">timesteps</span> <span class="ruby-comment"># => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,..., 120] (seconds)</span>
|
321
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">durations</span> <span class="ruby-comment"># => [50.3, 51.2, 40.3, 51.3, 50.3, 55.3, 52.3, 50.3, 51.3, 50.3, 54.3,..., 50.3] (average duration in milliseconds)</span>
|
322
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">requests</span> <span class="ruby-comment"># => [580, 569, 540, 524, 524, 525, 528, 520, 529, 527, 523,..., 524] (requests in that second)</span>
|
323
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>) <span class="ruby-comment"># => [400, 509, 340, 424, 324, 525, 528, 520, 529, 527, 523,..., 524] (GET requests in that second)</span>
|
324
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">post</span>) <span class="ruby-comment"># => [400, 509, 340, 424, 324, 525, 528, 520, 529, 527, 523,..., 524] (POST requests in that second)</span>
|
325
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>) <span class="ruby-comment"># => [400, 509, 340, 424, 324, 525, 528, 520, 529, 527, 523,..., 524] (successful - requests in that second)</span>
|
326
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">statuses</span>(<span class="ruby-value">404</span>) <span class="ruby-comment"># => [400, 509, 340, 424, 324, 525, 528, 520, 529, 527, 523,..., 524] (not founds - requests in that second)</span>
|
327
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/"</span>) <span class="ruby-comment"># => [400, 509, 340, 424, 324, 525, 528, 520, 529, 527, 523,..., 524] (requests to a path in that second)</span>
|
328
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/home"</span>) <span class="ruby-comment"># => [400, 509, 340, 424, 324, 525, 528, 520, 529, 527, 523,..., 524] (requests to "/home" path in that second)</span>
|
329
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">benchmark</span>(<span class="ruby-string">"index"</span>) <span class="ruby-comment"># => [400, 509, 340, 424, 324, 525, 528, 520, 529, 527, 523,..., 524] (requests from the index benchmark in that second)</span>
|
330
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">benchmark</span>(<span class="ruby-string">"user"</span>) <span class="ruby-comment"># => [400, 509, 340, 424, 324, 525, 528, 520, 529, 527, 523,..., 524] (requests from the user benchmark in that second)</span>
|
331
|
+
|
332
|
+
<span class="ruby-comment"># Duration was 120 seconds = 2 minutes</span>
|
333
|
+
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">timesteps</span> <span class="ruby-comment"># => [0, 1] (minutes)</span>
|
334
|
+
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">durations</span> <span class="ruby-comment"># => [50.3, 51.2] (average duration in milliseconds)</span>
|
335
|
+
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">requests</span> <span class="ruby-comment"># => [27836, 27684] (requests in that minute)</span>
|
336
|
+
</pre>
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
<div class="method-source-code" id="cluster-source">
|
341
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor/environment.rb, line 129</span>
|
342
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">cluster</span>(<span class="ruby-identifier">timebase</span> = <span class="ruby-value">1</span>.<span class="ruby-identifier">second</span>, <span class="ruby-identifier">extra_scope</span> = <span class="ruby-keyword">nil</span>)
|
343
|
+
<span class="ruby-identifier">cluster_scope</span> = <span class="ruby-identifier">extra_scope</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">scope</span>
|
344
|
+
<span class="ruby-identifier">timebase_and_scope</span> = [<span class="ruby-identifier">timebase</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">cluster_scope</span>]
|
345
|
+
|
346
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">@@clusters</span>[<span class="ruby-identifier">timebase_and_scope</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">@@clusters</span>[<span class="ruby-identifier">timebase_and_scope</span>].<span class="ruby-identifier">nil?</span>
|
347
|
+
<span class="ruby-identifier">@@clusters</span>[<span class="ruby-identifier">timebase_and_scope</span>] = <span class="ruby-constant">Cluster</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">timebase</span>, <span class="ruby-identifier">cluster_scope</span>)
|
348
|
+
<span class="ruby-keyword">end</span></pre>
|
349
|
+
</div><!-- cluster-source -->
|
350
|
+
|
351
|
+
</div>
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
</div><!-- cluster-method -->
|
357
|
+
|
358
|
+
|
359
|
+
<div id="method-i-each_benchmark" class="method-detail ">
|
360
|
+
|
361
|
+
<div class="method-heading">
|
362
|
+
<span class="method-name">each_benchmark</span><span
|
363
|
+
class="method-args">() { |benchmark| ... }</span>
|
364
|
+
<span class="method-click-advice">click to toggle source</span>
|
365
|
+
</div>
|
366
|
+
|
367
|
+
|
368
|
+
<div class="method-description">
|
369
|
+
|
370
|
+
<p>Iterates over all benchmarks and automatically executes all methods in the
|
371
|
+
benchmark scope like this:</p>
|
372
|
+
|
373
|
+
<pre class="ruby"><span class="ruby-comment"># For all benchmarks</span>
|
374
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">durations</span>
|
375
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">requests</span>
|
376
|
+
|
377
|
+
<span class="ruby-comment"># For each benchmark</span>
|
378
|
+
<span class="ruby-identifier">each_benchmark</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">benchmark</span><span class="ruby-operator">|</span>
|
379
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">durations</span>
|
380
|
+
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">requests</span>
|
381
|
+
<span class="ruby-keyword">end</span>
|
382
|
+
</pre>
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
<div class="method-source-code" id="each_benchmark-source">
|
387
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor/environment.rb, line 100</span>
|
388
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">each_benchmark</span>
|
389
|
+
<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>
|
390
|
+
<span class="ruby-identifier">scope_to_benchmark</span>(<span class="ruby-identifier">benchmark</span>.<span class="ruby-identifier">name</span>) <span class="ruby-keyword">do</span>
|
391
|
+
<span class="ruby-keyword">yield</span> <span class="ruby-identifier">benchmark</span>
|
392
|
+
<span class="ruby-keyword">end</span>
|
393
|
+
<span class="ruby-keyword">end</span>
|
394
|
+
<span class="ruby-keyword">end</span></pre>
|
395
|
+
</div><!-- each_benchmark-source -->
|
396
|
+
|
397
|
+
</div>
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
</div><!-- each_benchmark-method -->
|
403
|
+
|
404
|
+
|
185
405
|
<div id="method-i-each_tracking" class="method-detail ">
|
186
406
|
|
187
407
|
<div class="method-heading">
|
@@ -212,7 +432,7 @@ following form:</p>
|
|
212
432
|
|
213
433
|
|
214
434
|
<div class="method-source-code" id="each_tracking-source">
|
215
|
-
<pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line
|
435
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor/environment.rb, line 54</span>
|
216
436
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">each_tracking</span>
|
217
437
|
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">output</span>, <span class="ruby-string">"r+"</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
218
438
|
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">each_line</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-keyword">yield</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">line</span>).<span class="ruby-identifier">inject</span>({}){<span class="ruby-operator">|</span><span class="ruby-identifier">memo</span>,(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)<span class="ruby-operator">|</span> <span class="ruby-identifier">memo</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">v</span>; <span class="ruby-identifier">memo</span>} <span class="ruby-keyword">unless</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">blank?</span> }
|
@@ -228,6 +448,273 @@ following form:</p>
|
|
228
448
|
</div><!-- each_tracking-method -->
|
229
449
|
|
230
450
|
|
451
|
+
<div id="method-i-normal_distribution" class="method-detail ">
|
452
|
+
|
453
|
+
<div class="method-heading">
|
454
|
+
<span class="method-name">normal_distribution</span><span
|
455
|
+
class="method-args">(timebase = 1.second)</span>
|
456
|
+
<span class="method-click-advice">click to toggle source</span>
|
457
|
+
</div>
|
458
|
+
|
459
|
+
|
460
|
+
<div class="method-description">
|
461
|
+
|
462
|
+
<p>Returns a gaussian distribution for the specified attribute. It
|
463
|
+
automatically calculates the neccessary mean and variance values and adapts
|
464
|
+
the x values to fit the bell curve best.</p>
|
465
|
+
|
466
|
+
<pre class="ruby"><span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">x</span> <span class="ruby-comment"># => [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ...]</span>
|
467
|
+
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [0, 0, 7, 8, 9, 10, 11, 10, 9, 8, 7, 4, ...]</span>
|
468
|
+
</pre>
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
<div class="method-source-code" id="normal_distribution-source">
|
473
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor/environment.rb, line 186</span>
|
474
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">normal_distribution</span>(<span class="ruby-identifier">timebase</span> = <span class="ruby-value">1</span>.<span class="ruby-identifier">second</span>)
|
475
|
+
<span class="ruby-identifier">timebase_and_scope</span> = [<span class="ruby-identifier">timebase</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">scope</span>]
|
476
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">@@normal_distribution</span>[<span class="ruby-identifier">timebase_and_scope</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">@@normal_distribution</span>[<span class="ruby-identifier">timebase_and_scope</span>].<span class="ruby-identifier">nil?</span>
|
477
|
+
|
478
|
+
<span class="ruby-identifier">@@normal_distribution</span>[<span class="ruby-identifier">timebase_and_scope</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">AttributeCluster</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">NormalDistribution</span>, <span class="ruby-value">:timebase</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">timebase</span>, <span class="ruby-value">:scope</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">scope</span>)
|
479
|
+
|
480
|
+
<span class="ruby-comment"># Duration is the only value that shouldn't be clustered in the statistics because we have real float values in it, and do not only count +1</span>
|
481
|
+
<span class="ruby-comment"># for the request. Because of this, we'll exchange the clustered durations y values with an array of all unclustered tracking durations</span>
|
482
|
+
<span class="ruby-identifier">@@normal_distribution</span>[<span class="ruby-identifier">timebase_and_scope</span>].<span class="ruby-identifier">instance_eval</span> <span class="ruby-keyword">do</span>
|
483
|
+
<span class="ruby-ivar">@durations</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-keyword">do</span>
|
484
|
+
<span class="ruby-ivar">@y</span> = <span class="ruby-identifier">trackings</span>.<span class="ruby-identifier">map</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">tracking</span><span class="ruby-operator">|</span> <span class="ruby-identifier">tracking</span>[<span class="ruby-value">:duration</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">tracking</span>[<span class="ruby-value">:benchmark</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">scope</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">scope</span> <span class="ruby-operator">==</span> <span class="ruby-value">:all</span> }.<span class="ruby-identifier">compact</span>
|
485
|
+
<span class="ruby-keyword">end</span>
|
486
|
+
<span class="ruby-keyword">end</span>
|
487
|
+
|
488
|
+
<span class="ruby-identifier">@@normal_distribution</span>[<span class="ruby-identifier">timebase_and_scope</span>]
|
489
|
+
<span class="ruby-keyword">end</span></pre>
|
490
|
+
</div><!-- normal_distribution-source -->
|
491
|
+
|
492
|
+
</div>
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
</div><!-- normal_distribution-method -->
|
498
|
+
|
499
|
+
|
500
|
+
<div id="method-i-polynomial_regression" class="method-detail ">
|
501
|
+
|
502
|
+
<div class="method-heading">
|
503
|
+
<span class="method-name">polynomial_regression</span><span
|
504
|
+
class="method-args">(new_options = {})</span>
|
505
|
+
<span class="method-click-advice">click to toggle source</span>
|
506
|
+
</div>
|
507
|
+
|
508
|
+
|
509
|
+
<div class="method-description">
|
510
|
+
|
511
|
+
<p>Returns a polynomial regression of a degree, a derivation and a timebase.
|
512
|
+
Possible options are:</p>
|
513
|
+
|
514
|
+
<pre class="ruby">[:<span class="ruby-identifier">degree</span>] <span class="ruby-constant">By</span> <span class="ruby-identifier">default</span> <span class="ruby-identifier">the</span> <span class="ruby-identifier">degree</span> <span class="ruby-identifier">is</span> <span class="ruby-value">1</span> <span class="ruby-identifier">which</span> <span class="ruby-identifier">results</span> <span class="ruby-keyword">in</span> <span class="ruby-identifier">a</span> <span class="ruby-identifier">linear</span> <span class="ruby-identifier">regression</span>. <span class="ruby-constant">There</span><span class="ruby-string">'s no limit to the degree.
|
515
|
+
[:derivation] By default the normal function, which means no derivation is returned. Currently only the first derivation is supported.
|
516
|
+
[:timebase] By default the cluster size is 1.second. Any timelimit can be added here, e.g. 1.minute
|
517
|
+
|
518
|
+
# Return a linear regression for the durations, clustered by seconds
|
519
|
+
polynomial_regression.durations.y
|
520
|
+
polynomial_regression(:degree => 1, :timebase => 1.second).durations.y
|
521
|
+
polynomial_regression(:degree => 1, :timebase => 1.second).durations.derivation(0)
|
522
|
+
|
523
|
+
# Return the first derivation of the linear regression for the durations, clustered by seconds
|
524
|
+
polynomial_regression(:degree => 1).durations.derivation(1)
|
525
|
+
polynomial_regression(:degree => 1, :timebase => 1.second).durations.derivation(1)
|
526
|
+
|
527
|
+
# Return a second degree polynomial regression for the durations, clustered by seconds
|
528
|
+
polynomial_regression(:degree => 2).durations.derivation(0)
|
529
|
+
polynomial_regression(:degree => 2, :timebase => 1.second).durations.derivation(0)
|
530
|
+
|
531
|
+
# Return the first derivation of the second degree polynomial regression for the durations, clustered by seconds
|
532
|
+
polynomial_regression(:degree => 2).durations.derivation(0)
|
533
|
+
polynomial_regression(:degree => 2, :timebase => 1.second).durations.derivation(0)
|
534
|
+
</span></pre>
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
<div class="method-source-code" id="polynomial_regression-source">
|
539
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor/environment.rb, line 227</span>
|
540
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">polynomial_regression</span>(<span class="ruby-identifier">new_options</span> = {})
|
541
|
+
<span class="ruby-identifier">options</span> = { <span class="ruby-value">:degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>, <span class="ruby-value">:timebase</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>.<span class="ruby-identifier">second</span> }.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">new_options</span>)
|
542
|
+
<span class="ruby-identifier">degree_and_timebase_and_scope</span> = [<span class="ruby-identifier">options</span>[<span class="ruby-value">:degree</span>], <span class="ruby-identifier">options</span>[<span class="ruby-value">:timebase</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">scope</span>]
|
543
|
+
|
544
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">@@regressions</span>[<span class="ruby-identifier">degree_and_timebase_and_scope</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">@@regressions</span>[<span class="ruby-identifier">degree_and_timebase_and_scope</span>].<span class="ruby-identifier">nil?</span>
|
545
|
+
|
546
|
+
<span class="ruby-identifier">@@regressions</span>[<span class="ruby-identifier">degree_and_timebase_and_scope</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">AttributeCluster</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">PolynomialRegression</span>, <span class="ruby-value">:timebase</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:timebase</span>], <span class="ruby-value">:scope</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">scope</span>, <span class="ruby-value">:degree</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:degree</span>])
|
547
|
+
<span class="ruby-keyword">end</span></pre>
|
548
|
+
</div><!-- polynomial_regression-source -->
|
549
|
+
|
550
|
+
</div>
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
</div><!-- polynomial_regression-method -->
|
556
|
+
|
557
|
+
|
558
|
+
<div id="method-i-scope" class="method-detail ">
|
559
|
+
|
560
|
+
<div class="method-heading">
|
561
|
+
<span class="method-name">scope</span><span
|
562
|
+
class="method-args">()</span>
|
563
|
+
<span class="method-click-advice">click to toggle source</span>
|
564
|
+
</div>
|
565
|
+
|
566
|
+
|
567
|
+
<div class="method-description">
|
568
|
+
|
569
|
+
<p>Returns the current scope the environment works in</p>
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
<div class="method-source-code" id="scope-source">
|
574
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor/environment.rb, line 69</span>
|
575
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">scope</span>
|
576
|
+
<span class="ruby-identifier">@@scope</span>
|
577
|
+
<span class="ruby-keyword">end</span></pre>
|
578
|
+
</div><!-- scope-source -->
|
579
|
+
|
580
|
+
</div>
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
</div><!-- scope-method -->
|
586
|
+
|
587
|
+
|
588
|
+
<div id="method-i-scope_to_benchmark" class="method-detail ">
|
589
|
+
|
590
|
+
<div class="method-heading">
|
591
|
+
<span class="method-name">scope_to_benchmark</span><span
|
592
|
+
class="method-args">(name) { || ... }</span>
|
593
|
+
<span class="method-click-advice">click to toggle source</span>
|
594
|
+
</div>
|
595
|
+
|
596
|
+
|
597
|
+
<div class="method-description">
|
598
|
+
|
599
|
+
<p>Executes the including methods in the scope of the benchmark:</p>
|
600
|
+
|
601
|
+
<pre># For the "index page" benchmark
|
602
|
+
scope_to_benchmark "index page" do
|
603
|
+
cluster.durations
|
604
|
+
cluster.requests
|
605
|
+
end</pre>
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
<div class="method-source-code" id="scope_to_benchmark-source">
|
610
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor/environment.rb, line 81</span>
|
611
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">scope_to_benchmark</span> <span class="ruby-identifier">name</span>
|
612
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">BenchmarkNotFound</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>) <span class="ruby-keyword">unless</span> <span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">benchmarks</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">name</span> }.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">name</span>)
|
613
|
+
<span class="ruby-identifier">@@scope</span> = <span class="ruby-identifier">name</span>
|
614
|
+
<span class="ruby-keyword">yield</span>
|
615
|
+
<span class="ruby-identifier">@@scope</span> = <span class="ruby-keyword">nil</span>
|
616
|
+
<span class="ruby-keyword">end</span></pre>
|
617
|
+
</div><!-- scope_to_benchmark-source -->
|
618
|
+
|
619
|
+
</div>
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
</div><!-- scope_to_benchmark-method -->
|
625
|
+
|
626
|
+
|
627
|
+
<div id="method-i-statistics" class="method-detail ">
|
628
|
+
|
629
|
+
<div class="method-heading">
|
630
|
+
<span class="method-name">statistics</span><span
|
631
|
+
class="method-args">(timebase = 1.second)</span>
|
632
|
+
<span class="method-click-advice">click to toggle source</span>
|
633
|
+
</div>
|
634
|
+
|
635
|
+
|
636
|
+
<div class="method-description">
|
637
|
+
|
638
|
+
<p>Returns the default statistics for a given attribute. The following
|
639
|
+
statistics are available:</p>
|
640
|
+
|
641
|
+
<pre class="ruby"><span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">max</span> <span class="ruby-comment"># => 78.2</span>
|
642
|
+
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">min</span> <span class="ruby-comment"># => 12.3</span>
|
643
|
+
|
644
|
+
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">mean</span> <span class="ruby-comment"># => 45.2</span>
|
645
|
+
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">average</span> <span class="ruby-comment"># => 45.2</span>
|
646
|
+
|
647
|
+
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">standard_deviation</span> <span class="ruby-comment"># => 11.3</span>
|
648
|
+
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">sd</span> <span class="ruby-comment"># => 11.3</span>
|
649
|
+
|
650
|
+
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">squared_deviation</span> <span class="ruby-comment"># => 60.7</span>
|
651
|
+
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">variance</span> <span class="ruby-comment"># => 60.7</span>
|
652
|
+
</pre>
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
<div class="method-source-code" id="statistics-source">
|
657
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor/environment.rb, line 163</span>
|
658
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">statistics</span>(<span class="ruby-identifier">timebase</span> = <span class="ruby-value">1</span>.<span class="ruby-identifier">second</span>)
|
659
|
+
<span class="ruby-identifier">timebase_and_scope</span> = [<span class="ruby-identifier">timebase</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">scope</span>]
|
660
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">@@statistics</span>[<span class="ruby-identifier">timebase_and_scope</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">@@statistics</span>[<span class="ruby-identifier">timebase_and_scope</span>].<span class="ruby-identifier">nil?</span>
|
661
|
+
|
662
|
+
<span class="ruby-identifier">@@statistics</span>[<span class="ruby-identifier">timebase_and_scope</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">AttributeCluster</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Statistics</span>, <span class="ruby-value">:timebase</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">timebase</span>, <span class="ruby-value">:scope</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">scope</span>)
|
663
|
+
|
664
|
+
<span class="ruby-comment"># Duration is the only value that shouldn't be clustered in the statistics because we have real float values in it, and do not only count +1</span>
|
665
|
+
<span class="ruby-comment"># for the request. Because of this, we'll exchange the clustered durations y values with an array of all unclustered tracking durations</span>
|
666
|
+
<span class="ruby-identifier">@@statistics</span>[<span class="ruby-identifier">timebase_and_scope</span>].<span class="ruby-identifier">instance_eval</span> <span class="ruby-keyword">do</span>
|
667
|
+
<span class="ruby-ivar">@durations</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-keyword">do</span>
|
668
|
+
<span class="ruby-ivar">@y</span> = <span class="ruby-identifier">trackings</span>.<span class="ruby-identifier">map</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">tracking</span><span class="ruby-operator">|</span> <span class="ruby-identifier">tracking</span>[<span class="ruby-value">:duration</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">tracking</span>[<span class="ruby-value">:benchmark</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">scope</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">scope</span> <span class="ruby-operator">==</span> <span class="ruby-value">:all</span> }.<span class="ruby-identifier">compact</span>
|
669
|
+
<span class="ruby-keyword">end</span>
|
670
|
+
<span class="ruby-keyword">end</span>
|
671
|
+
|
672
|
+
<span class="ruby-identifier">@@statistics</span>[<span class="ruby-identifier">timebase_and_scope</span>]
|
673
|
+
<span class="ruby-keyword">end</span></pre>
|
674
|
+
</div><!-- statistics-source -->
|
675
|
+
|
676
|
+
</div>
|
677
|
+
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
</div><!-- statistics-method -->
|
682
|
+
|
683
|
+
|
684
|
+
<div id="method-i-trackings" class="method-detail ">
|
685
|
+
|
686
|
+
<div class="method-heading">
|
687
|
+
<span class="method-name">trackings</span><span
|
688
|
+
class="method-args">()</span>
|
689
|
+
<span class="method-click-advice">click to toggle source</span>
|
690
|
+
</div>
|
691
|
+
|
692
|
+
|
693
|
+
<div class="method-description">
|
694
|
+
|
695
|
+
<p>Puts all tracking hashes into a huge array. Warning, this method call might
|
696
|
+
take quite long! The results are cached, so you can call
|
697
|
+
<code>trackings</code> in the future without any pain</p>
|
698
|
+
|
699
|
+
|
700
|
+
|
701
|
+
<div class="method-source-code" id="trackings-source">
|
702
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor/environment.rb, line 62</span>
|
703
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">trackings</span>
|
704
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">@@trackings</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">@@trackings</span>.<span class="ruby-identifier">empty?</span>
|
705
|
+
<span class="ruby-identifier">each_tracking</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">tracking</span><span class="ruby-operator">|</span> <span class="ruby-identifier">@@trackings</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">tracking</span> }
|
706
|
+
<span class="ruby-identifier">@@trackings</span>
|
707
|
+
<span class="ruby-keyword">end</span></pre>
|
708
|
+
</div><!-- trackings-source -->
|
709
|
+
|
710
|
+
</div>
|
711
|
+
|
712
|
+
|
713
|
+
|
714
|
+
|
715
|
+
</div><!-- trackings-method -->
|
716
|
+
|
717
|
+
|
231
718
|
</section><!-- public-instance-method-details -->
|
232
719
|
|
233
720
|
</section><!-- 5Buntitled-5D -->
|