bigbench 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.textile +29 -249
- data/bigbench.gemspec +1 -0
- data/bin/bigbench +1 -1
- data/dev/request_sequence.dot +235 -0
- data/dev/request_sequence.pdf +0 -0
- data/dev/sequence.rb +48 -0
- data/doc/Array.html +5 -5
- data/doc/BigBench.html +27 -60
- data/doc/BigBench/Benchmark.html +5 -5
- data/doc/BigBench/Benchmark/Benchmark.html +8 -8
- data/doc/BigBench/Benchmark/Looper.html +5 -5
- data/doc/BigBench/Bot.html +5 -5
- data/doc/BigBench/Configuration.html +29 -53
- data/doc/BigBench/Executor.html +14 -95
- data/doc/BigBench/Executor/Executable.html +551 -0
- data/doc/BigBench/Fragment.html +5 -5
- data/doc/BigBench/Fragment/Fragment.html +5 -5
- data/doc/BigBench/Output.html +7 -8
- data/doc/BigBench/PostProcessor.html +8 -8
- data/doc/BigBench/PostProcessor/Context.html +219 -0
- data/doc/BigBench/PostProcessor/Environment.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/Appearings.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/AttributeCluster.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/BenchmarkNotFound.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/Cluster.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/NormalDistribution.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/PolynomialRegression.html +5 -5
- data/doc/BigBench/PostProcessor/Environment/Statistics.html +5 -5
- data/doc/BigBench/PostProcessor/Graphs.html +5 -5
- data/doc/BigBench/PostProcessor/Graphs/LineGraph.html +5 -5
- data/doc/BigBench/PostProcessor/Graphs/PieGraph.html +5 -5
- data/doc/BigBench/PostProcessor/InvalidProcessor.html +6 -6
- data/doc/BigBench/PostProcessor/Processor.html +6 -6
- data/doc/BigBench/PostProcessor/Statistics.html +5 -5
- data/doc/BigBench/PostProcessor/Test.html +6 -6
- data/doc/BigBench/PostProcessor/TestPretty.html +249 -0
- data/doc/BigBench/Runner.html +5 -5
- data/doc/BigBench/Runner/NoBenchmarksDefined.html +5 -5
- data/doc/BigBench/Store.html +8 -8
- data/doc/BigBench/Tracker.html +5 -5
- data/doc/BigBench/Tracker/Tracker.html +5 -5
- data/doc/EventMachineLoop.html +5 -5
- data/doc/Float.html +5 -5
- data/doc/Gemfile.html +5 -5
- data/doc/Helpers.html +5 -5
- data/doc/Object.html +24 -5
- data/doc/README_rdoc.html +51 -281
- data/doc/Rakefile.html +5 -5
- data/doc/created.rid +46 -46
- data/doc/index.html +51 -281
- data/doc/js/search_index.js +1 -1
- data/doc/lib/bigbench/help/executor_txt.html +14 -29
- data/doc/table_of_contents.html +63 -68
- data/lib/bigbench.rb +2 -0
- data/lib/bigbench/benchmark.rb +3 -3
- data/lib/bigbench/configuration.rb +29 -68
- data/lib/bigbench/executor.rb +100 -130
- data/lib/bigbench/help/executor.txt +9 -22
- data/lib/bigbench/output.rb +2 -3
- data/lib/bigbench/post_processor.rb +16 -4
- data/lib/bigbench/runner.rb +0 -1
- data/lib/bigbench/store.rb +2 -2
- data/lib/bigbench/templates/test_plan.rb.erb +17 -0
- data/lib/bigbench/version.rb +1 -1
- data/spec/configure_spec.rb +7 -18
- data/spec/executor_spec.rb +25 -35
- data/spec/post_processor_spec.rb +31 -1
- data/spec/post_processors/environment_spec.rb +5 -3
- data/spec/post_processors/graphs_spec.rb +8 -3
- data/spec/post_processors/statistics_spec.rb +6 -1
- data/spec/runner_spec.rb +7 -6
- data/spec/store_spec.rb +4 -3
- data/spec/tests/local.rb +5 -5
- data/spec/tests/with_post_processor.rb +5 -5
- data/spec/tracker_spec.rb +12 -8
- metadata +48 -31
- data/dev/test.rb +0 -13
data/doc/Float.html
CHANGED
@@ -111,13 +111,9 @@
|
|
111
111
|
|
112
112
|
<li><a href="./BigBench/Configuration.html">BigBench::Configuration</a>
|
113
113
|
|
114
|
-
<li><a href="./BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
|
115
|
-
|
116
|
-
<li><a href="./BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
|
117
|
-
|
118
114
|
<li><a href="./BigBench/Executor.html">BigBench::Executor</a>
|
119
115
|
|
120
|
-
<li><a href="./BigBench/Executor/
|
116
|
+
<li><a href="./BigBench/Executor/Executable.html">BigBench::Executor::Executable</a>
|
121
117
|
|
122
118
|
<li><a href="./BigBench/Fragment.html">BigBench::Fragment</a>
|
123
119
|
|
@@ -127,6 +123,8 @@
|
|
127
123
|
|
128
124
|
<li><a href="./BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
129
125
|
|
126
|
+
<li><a href="./BigBench/PostProcessor/Context.html">BigBench::PostProcessor::Context</a>
|
127
|
+
|
130
128
|
<li><a href="./BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
131
129
|
|
132
130
|
<li><a href="./BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
@@ -157,6 +155,8 @@
|
|
157
155
|
|
158
156
|
<li><a href="./BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
159
157
|
|
158
|
+
<li><a href="./BigBench/PostProcessor/TestPretty.html">BigBench::PostProcessor::TestPretty</a>
|
159
|
+
|
160
160
|
<li><a href="./BigBench/Runner.html">BigBench::Runner</a>
|
161
161
|
|
162
162
|
<li><a href="./BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
data/doc/Gemfile.html
CHANGED
@@ -77,13 +77,9 @@
|
|
77
77
|
|
78
78
|
<li><a href="./BigBench/Configuration.html">BigBench::Configuration</a>
|
79
79
|
|
80
|
-
<li><a href="./BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
|
81
|
-
|
82
|
-
<li><a href="./BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
|
83
|
-
|
84
80
|
<li><a href="./BigBench/Executor.html">BigBench::Executor</a>
|
85
81
|
|
86
|
-
<li><a href="./BigBench/Executor/
|
82
|
+
<li><a href="./BigBench/Executor/Executable.html">BigBench::Executor::Executable</a>
|
87
83
|
|
88
84
|
<li><a href="./BigBench/Fragment.html">BigBench::Fragment</a>
|
89
85
|
|
@@ -93,6 +89,8 @@
|
|
93
89
|
|
94
90
|
<li><a href="./BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
95
91
|
|
92
|
+
<li><a href="./BigBench/PostProcessor/Context.html">BigBench::PostProcessor::Context</a>
|
93
|
+
|
96
94
|
<li><a href="./BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
97
95
|
|
98
96
|
<li><a href="./BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
@@ -123,6 +121,8 @@
|
|
123
121
|
|
124
122
|
<li><a href="./BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
125
123
|
|
124
|
+
<li><a href="./BigBench/PostProcessor/TestPretty.html">BigBench::PostProcessor::TestPretty</a>
|
125
|
+
|
126
126
|
<li><a href="./BigBench/Runner.html">BigBench::Runner</a>
|
127
127
|
|
128
128
|
<li><a href="./BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
data/doc/Helpers.html
CHANGED
@@ -105,13 +105,9 @@
|
|
105
105
|
|
106
106
|
<li><a href="./BigBench/Configuration.html">BigBench::Configuration</a>
|
107
107
|
|
108
|
-
<li><a href="./BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
|
109
|
-
|
110
|
-
<li><a href="./BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
|
111
|
-
|
112
108
|
<li><a href="./BigBench/Executor.html">BigBench::Executor</a>
|
113
109
|
|
114
|
-
<li><a href="./BigBench/Executor/
|
110
|
+
<li><a href="./BigBench/Executor/Executable.html">BigBench::Executor::Executable</a>
|
115
111
|
|
116
112
|
<li><a href="./BigBench/Fragment.html">BigBench::Fragment</a>
|
117
113
|
|
@@ -121,6 +117,8 @@
|
|
121
117
|
|
122
118
|
<li><a href="./BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
123
119
|
|
120
|
+
<li><a href="./BigBench/PostProcessor/Context.html">BigBench::PostProcessor::Context</a>
|
121
|
+
|
124
122
|
<li><a href="./BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
125
123
|
|
126
124
|
<li><a href="./BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
@@ -151,6 +149,8 @@
|
|
151
149
|
|
152
150
|
<li><a href="./BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
153
151
|
|
152
|
+
<li><a href="./BigBench/PostProcessor/TestPretty.html">BigBench::PostProcessor::TestPretty</a>
|
153
|
+
|
154
154
|
<li><a href="./BigBench/Runner.html">BigBench::Runner</a>
|
155
155
|
|
156
156
|
<li><a href="./BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
data/doc/Object.html
CHANGED
@@ -47,6 +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>dev/sequence.rb
|
50
51
|
<li>spec/helpers.rb
|
51
52
|
<li>spec/lib/test_web_server.rb
|
52
53
|
<li>spec/post_processors/environment_spec.rb
|
@@ -131,13 +132,9 @@
|
|
131
132
|
|
132
133
|
<li><a href="./BigBench/Configuration.html">BigBench::Configuration</a>
|
133
134
|
|
134
|
-
<li><a href="./BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
|
135
|
-
|
136
|
-
<li><a href="./BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
|
137
|
-
|
138
135
|
<li><a href="./BigBench/Executor.html">BigBench::Executor</a>
|
139
136
|
|
140
|
-
<li><a href="./BigBench/Executor/
|
137
|
+
<li><a href="./BigBench/Executor/Executable.html">BigBench::Executor::Executable</a>
|
141
138
|
|
142
139
|
<li><a href="./BigBench/Fragment.html">BigBench::Fragment</a>
|
143
140
|
|
@@ -147,6 +144,8 @@
|
|
147
144
|
|
148
145
|
<li><a href="./BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
149
146
|
|
147
|
+
<li><a href="./BigBench/PostProcessor/Context.html">BigBench::PostProcessor::Context</a>
|
148
|
+
|
150
149
|
<li><a href="./BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
151
150
|
|
152
151
|
<li><a href="./BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
@@ -177,6 +176,8 @@
|
|
177
176
|
|
178
177
|
<li><a href="./BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
179
178
|
|
179
|
+
<li><a href="./BigBench/PostProcessor/TestPretty.html">BigBench::PostProcessor::TestPretty</a>
|
180
|
+
|
180
181
|
<li><a href="./BigBench/Runner.html">BigBench::Runner</a>
|
181
182
|
|
182
183
|
<li><a href="./BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
@@ -219,6 +220,24 @@
|
|
219
220
|
|
220
221
|
|
221
222
|
|
223
|
+
<!-- Constants -->
|
224
|
+
<section id="constants-list" class="section">
|
225
|
+
<h3 class="section-header">Constants</h3>
|
226
|
+
<dl>
|
227
|
+
|
228
|
+
<dt id="BENCHMARKS">BENCHMARKS
|
229
|
+
|
230
|
+
<dd class="description">
|
231
|
+
|
232
|
+
|
233
|
+
<dt id="USER">USER
|
234
|
+
|
235
|
+
<dd class="description">
|
236
|
+
|
237
|
+
|
238
|
+
</dl>
|
239
|
+
</section>
|
240
|
+
|
222
241
|
|
223
242
|
|
224
243
|
|
data/doc/README_rdoc.html
CHANGED
@@ -77,13 +77,9 @@
|
|
77
77
|
|
78
78
|
<li><a href="./BigBench/Configuration.html">BigBench::Configuration</a>
|
79
79
|
|
80
|
-
<li><a href="./BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
|
81
|
-
|
82
|
-
<li><a href="./BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
|
83
|
-
|
84
80
|
<li><a href="./BigBench/Executor.html">BigBench::Executor</a>
|
85
81
|
|
86
|
-
<li><a href="./BigBench/Executor/
|
82
|
+
<li><a href="./BigBench/Executor/Executable.html">BigBench::Executor::Executable</a>
|
87
83
|
|
88
84
|
<li><a href="./BigBench/Fragment.html">BigBench::Fragment</a>
|
89
85
|
|
@@ -93,6 +89,8 @@
|
|
93
89
|
|
94
90
|
<li><a href="./BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
95
91
|
|
92
|
+
<li><a href="./BigBench/PostProcessor/Context.html">BigBench::PostProcessor::Context</a>
|
93
|
+
|
96
94
|
<li><a href="./BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
97
95
|
|
98
96
|
<li><a href="./BigBench/PostProcessor/Environment/Appearings.html">BigBench::PostProcessor::Environment::Appearings</a>
|
@@ -123,6 +121,8 @@
|
|
123
121
|
|
124
122
|
<li><a href="./BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
125
123
|
|
124
|
+
<li><a href="./BigBench/PostProcessor/TestPretty.html">BigBench::PostProcessor::TestPretty</a>
|
125
|
+
|
126
126
|
<li><a href="./BigBench/Runner.html">BigBench::Runner</a>
|
127
127
|
|
128
128
|
<li><a href="./BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
@@ -197,12 +197,12 @@ finished</p>
|
|
197
197
|
<p>How do the test receipts look like? As easy as possible. For example like
|
198
198
|
this in <code>example.rb</code>:</p>
|
199
199
|
|
200
|
-
<pre class="ruby"><span class="ruby-identifier">configure</span>
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
200
|
+
<pre class="ruby"><span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
201
|
+
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">duration</span> = <span class="ruby-value">2</span>.<span class="ruby-identifier">minutes</span>
|
202
|
+
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">output</span> = <span class="ruby-string">"example.ljson"</span>
|
203
|
+
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">users</span> = <span class="ruby-value">5</span>
|
204
|
+
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">basic_auth</span> = [<span class="ruby-string">'username'</span>, <span class="ruby-string">'password'</span>]
|
205
|
+
<span class="ruby-keyword">end</span>
|
206
206
|
|
207
207
|
<span class="ruby-identifier">benchmark</span> <span class="ruby-string">"default website pages"</span> =<span class="ruby-operator">></span> <span class="ruby-string">"http://localhost:3000"</span> <span class="ruby-keyword">do</span>
|
208
208
|
<span class="ruby-identifier">get</span> <span class="ruby-string">"/"</span>
|
@@ -219,6 +219,12 @@ this in <code>example.rb</code>:</p>
|
|
219
219
|
<span class="ruby-identifier">post_process</span> :<span class="ruby-identifier">statistics</span>
|
220
220
|
</pre>
|
221
221
|
|
222
|
+
<h3 id="label-Generator">Generator</h3>
|
223
|
+
|
224
|
+
<p>You can have your test receipts generated!</p>
|
225
|
+
|
226
|
+
<pre>bigbench generate sample</pre>
|
227
|
+
|
222
228
|
<h2 id="label-Single+Host+vs.+Multiple+Hosts+Testing">Single Host vs. Multiple Hosts Testing</h2>
|
223
229
|
|
224
230
|
<p>You can either test with a single machine right from your local host, or
|
@@ -230,7 +236,7 @@ stay the same.</p>
|
|
230
236
|
<p><a href="BigBench.html">BigBench</a> allows you to run your tests against
|
231
237
|
every host from your local machine. The command for this looks like this:</p>
|
232
238
|
|
233
|
-
<pre>bigbench
|
239
|
+
<pre>bigbench local example.rb</pre>
|
234
240
|
|
235
241
|
<h3 id="label-Multiple+Hosts+with+Bots">Multiple Hosts with Bots</h3>
|
236
242
|
|
@@ -239,12 +245,12 @@ you can run your tests from multiple hosts. Everything you need for this is
|
|
239
245
|
a redis that is reachable from all testing hosts. Every host simply starts
|
240
246
|
a bot that is checking for a new test receipt every minute like this:</p>
|
241
247
|
|
242
|
-
<pre>bigbench
|
248
|
+
<pre>bigbench bot redis_url:port redis_password</pre>
|
243
249
|
|
244
250
|
<p>Then to run the tests from all hosts simply use the same receipt as you
|
245
251
|
would use for a local run and call it like this:</p>
|
246
252
|
|
247
|
-
<pre>bigbench
|
253
|
+
<pre>bigbench bots example.rb redis_url:port redis_password</pre>
|
248
254
|
|
249
255
|
<p>This will upload the test receipt to all bots and make them run it. Every
|
250
256
|
bot reports its results back to the redis and the local machine then
|
@@ -252,7 +258,7 @@ combines, and writes them to the output file. So you test with the same
|
|
252
258
|
receipts and get the same results, no matter if your testing from the local
|
253
259
|
host or with multiple bots.</p>
|
254
260
|
|
255
|
-
<p><img src="http://southdesign.github.com/bigbench/
|
261
|
+
<p><img src="http://southdesign.github.com/bigbench/graphs/structure.png" /></p>
|
256
262
|
|
257
263
|
<h2 id="label-Output">Output</h2>
|
258
264
|
|
@@ -305,7 +311,8 @@ that do something with the collected data. To setup a hook simply use the
|
|
305
311
|
<span class="ruby-keyword">end</span>
|
306
312
|
</pre>
|
307
313
|
|
308
|
-
<p>It’s very easy to write
|
314
|
+
<p>It’s also very easy to write an own post processor. The basic structure is
|
315
|
+
like this:</p>
|
309
316
|
|
310
317
|
<pre class="ruby"><span class="ruby-keyword">module</span> <span class="ruby-constant">BigBench</span>
|
311
318
|
<span class="ruby-keyword">module</span> <span class="ruby-constant">PostProcessor</span>
|
@@ -326,241 +333,26 @@ that do something with the collected data. To setup a hook simply use the
|
|
326
333
|
# or
|
327
334
|
post_process BigBench::PostProcessor::SamplePostProcessor</pre>
|
328
335
|
|
329
|
-
<h3 id="label-Post+Processor+Environment">Post Processor Environment</h3>
|
330
|
-
|
331
|
-
<p>Post processors by default offer a great load of functionality that helps
|
332
|
-
to evaluate the benchmarks. The available methods are:</p>
|
333
|
-
|
334
|
-
<h4 id="label-each_tracking">each_tracking</h4>
|
335
|
-
|
336
|
-
<p>Iterate over each of the tracking elements. The trackings are read
|
337
|
-
line-by-line. This is the fastest approach and should be used for huge
|
338
|
-
datasets because the trackings are not loaded completely into memory.</p>
|
339
|
-
|
340
|
-
<pre class="ruby"><span class="ruby-identifier">total_trackings</span>, <span class="ruby-identifier">total_errors</span> = <span class="ruby-value">0</span>, <span class="ruby-value">0</span>
|
341
|
-
<span class="ruby-identifier">each_tracking</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tracking</span><span class="ruby-operator">|</span>
|
342
|
-
<span class="ruby-identifier">total_trackings</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
343
|
-
<span class="ruby-identifier">total_errors</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">tracking</span>[:<span class="ruby-identifier">status</span>] <span class="ruby-operator">==</span> <span class="ruby-value">200</span>
|
344
|
-
<span class="ruby-keyword">end</span>
|
345
|
-
</pre>
|
346
|
-
|
347
|
-
<h4 id="label-trackings">trackings</h4>
|
348
|
-
|
349
|
-
<p>An array with all tracking hashes in it. The creation might take some time
|
350
|
-
at the first usage, afterwards the array is cached automatically.</p>
|
351
|
-
|
352
|
-
<pre class="ruby"><span class="ruby-identifier">trackings</span>.<span class="ruby-identifier">size</span> <span class="ruby-comment"># => 650456</span>
|
353
|
-
<span class="ruby-identifier">trackings</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tracking</span><span class="ruby-operator">|</span>
|
354
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tracking</span>[:<span class="ruby-identifier">duration</span>]
|
355
|
-
<span class="ruby-keyword">end</span>
|
356
|
-
</pre>
|
357
|
-
|
358
|
-
<h4 id="label-statistics">statistics</h4>
|
359
|
-
|
360
|
-
<p>Computes the default statistics for any attribute</p>
|
361
|
-
|
362
|
-
<pre class="ruby"><span class="ruby-comment"># Unclustered statistics</span>
|
363
|
-
<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>
|
364
|
-
<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>
|
365
|
-
|
366
|
-
<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>
|
367
|
-
<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>
|
368
|
-
|
369
|
-
<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>
|
370
|
-
<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>
|
371
|
-
|
372
|
-
<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>
|
373
|
-
<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>
|
374
|
-
|
375
|
-
<span class="ruby-comment"># Time clustered statistics - 1.second</span>
|
376
|
-
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">max</span> <span class="ruby-comment"># => 42.1</span>
|
377
|
-
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">min</span> <span class="ruby-comment"># => 12.3</span>
|
378
|
-
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>).<span class="ruby-identifier">max</span> <span class="ruby-comment"># => 42.1</span>
|
379
|
-
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>).<span class="ruby-identifier">average</span> <span class="ruby-comment"># => 33.1</span>
|
380
|
-
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">benchmark</span>(<span class="ruby-string">"index page"</span>).<span class="ruby-identifier">average</span> <span class="ruby-comment"># => 32.9</span>
|
381
|
-
<span class="ruby-identifier">statistics</span>.<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/"</span>).<span class="ruby-identifier">average</span> <span class="ruby-comment"># => 12.5</span>
|
382
|
-
</pre>
|
383
|
-
|
384
|
-
<h4 id="label-cluster">cluster</h4>
|
385
|
-
|
386
|
-
<p>Clusters the resulting trackings by a timebase. The default timebase is
|
387
|
-
<code>1.second</code> which means, that it groups all trackings to full
|
388
|
-
seconds and calculates the amount of requests and the average duration.</p>
|
389
|
-
|
390
|
-
<pre class="ruby"><span class="ruby-comment"># Duration is 120 seconds for this example</span>
|
391
|
-
|
392
|
-
<span class="ruby-comment"># 1.second</span>
|
393
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">timesteps</span> <span class="ruby-comment"># => [1, 2, ..., 120]</span>
|
394
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">durations</span> <span class="ruby-comment"># => [43, 96, ..., 41]</span>
|
395
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">requests</span> <span class="ruby-comment"># => [503, 541, ..., 511]</span>
|
396
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>) <span class="ruby-comment"># => [200, 204, ..., 209]</span>
|
397
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">post</span>) <span class="ruby-comment"># => [201, 102, ..., 401]</span>
|
398
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>) <span class="ruby-comment"># => [501, 502, ..., 102]</span>
|
399
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">statuses</span>(<span class="ruby-value">404</span>) <span class="ruby-comment"># => [3, 1, ..., 0]</span>
|
400
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/"</span>) <span class="ruby-comment"># => [401, 482, ..., 271]</span>
|
401
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/logout"</span>) <span class="ruby-comment"># => [56, 51, ..., 38]</span>
|
402
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">benchmark</span>(<span class="ruby-string">"index"</span>) <span class="ruby-comment"># => [342, 531, ..., 234]</span>
|
403
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">benchmark</span>(<span class="ruby-string">"user"</span>) <span class="ruby-comment"># => [22, 41, ..., 556]</span>
|
404
|
-
|
405
|
-
<span class="ruby-comment"># 1.minute</span>
|
406
|
-
<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]</span>
|
407
|
-
<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"># => [42, 44]</span>
|
408
|
-
<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"># => [24032, 21893]</span>
|
409
|
-
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>) <span class="ruby-comment"># => [200, 204]</span>
|
410
|
-
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>) <span class="ruby-comment"># => [501, 502]</span>
|
411
|
-
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/"</span>) <span class="ruby-comment"># => [401, 482]</span>
|
412
|
-
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">benchmark</span>(<span class="ruby-string">"user"</span>) <span class="ruby-comment"># => [22, 41]</span>
|
413
|
-
|
414
|
-
<span class="ruby-comment"># 30.seconds</span>
|
415
|
-
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">30</span>.<span class="ruby-identifier">seconds</span>).<span class="ruby-identifier">timesteps</span> <span class="ruby-comment"># => [0, 1, 2, 3]</span>
|
416
|
-
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">30</span>.<span class="ruby-identifier">seconds</span>).<span class="ruby-identifier">durations</span> <span class="ruby-comment"># => [42, 44, 41, 40]</span>
|
417
|
-
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">30</span>.<span class="ruby-identifier">seconds</span>).<span class="ruby-identifier">requests</span> <span class="ruby-comment"># => [11023, 10234, 12345, 13789]</span>
|
418
|
-
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">30</span>.<span class="ruby-identifier">seconds</span>).<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>) <span class="ruby-comment"># => [200, 204, 34, 124]</span>
|
419
|
-
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">30</span>.<span class="ruby-identifier">seconds</span>).<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>) <span class="ruby-comment"># => [501, 502, 243, 57]</span>
|
420
|
-
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">30</span>.<span class="ruby-identifier">seconds</span>).<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/"</span>) <span class="ruby-comment"># => [401, 482, 124, 234]</span>
|
421
|
-
<span class="ruby-identifier">cluster</span>(<span class="ruby-value">30</span>.<span class="ruby-identifier">seconds</span>).<span class="ruby-identifier">benchmark</span>(<span class="ruby-string">"user"</span>) <span class="ruby-comment"># => [22, 41, 12, 51]</span>
|
422
|
-
</pre>
|
423
|
-
|
424
|
-
<h4 id="label-appearing">appearing</h4>
|
425
|
-
|
426
|
-
<p>Lists the unique attribute values that appeared in all trackings or the
|
427
|
-
selected tracking scope.</p>
|
428
|
-
|
429
|
-
<pre class="ruby"><span class="ruby-identifier">appearing</span>.<span class="ruby-identifier">statuses</span> <span class="ruby-comment"># => [200, 404]</span>
|
430
|
-
<span class="ruby-identifier">appearing</span>.<span class="ruby-identifier">methods</span> <span class="ruby-comment"># => ["get", "post"]</span>
|
431
|
-
<span class="ruby-identifier">appearing</span>.<span class="ruby-identifier">paths</span> <span class="ruby-comment"># => ["/", "/basic/auth"</span>
|
432
|
-
</pre>
|
336
|
+
<h3 id="label-Post+Processor+Environment+API">Post Processor Environment API</h3>
|
433
337
|
|
434
|
-
<
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">x</span> <span class="ruby-comment"># => [1, 2, ..., 120]</span>
|
443
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [45, 23, ..., 36]</span>
|
444
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [43, 45, ..., 62]</span>
|
445
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [23, 62, ..., 23]</span>
|
446
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [51, 22, ..., 15]</span>
|
447
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/"</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [78, 12, ..., 63]</span>
|
448
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">benchmarks</span>(<span class="ruby-string">"index page"</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [12, 45, ..., 23]</span>
|
449
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">degree</span> <span class="ruby-comment"># => 1</span>
|
450
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">formula</span> <span class="ruby-comment"># => "43.00886000234 + 0.0167548964060689x^1"</span>
|
451
|
-
|
452
|
-
<span class="ruby-comment"># 1. Derivation</span>
|
453
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">derivation</span>(<span class="ruby-value">1</span>) <span class="ruby-comment"># => [0.01, 0.01, ..., 0.01]</span>
|
454
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">derivation</span>(<span class="ruby-value">1</span>) <span class="ruby-comment"># => [405, 405, ..., 406]</span>
|
455
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>).<span class="ruby-identifier">derivation</span>(<span class="ruby-value">1</span>) <span class="ruby-comment"># => [23, 62, ..., 23]</span>
|
456
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>).<span class="ruby-identifier">derivation</span>(<span class="ruby-value">1</span>) <span class="ruby-comment"># => [51, 22, ..., 15]</span>
|
457
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/"</span>).<span class="ruby-identifier">derivation</span>(<span class="ruby-value">1</span>) <span class="ruby-comment"># => [78, 12, ..., 63]</span>
|
458
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">benchmarks</span>(<span class="ruby-string">"index page"</span>).<span class="ruby-identifier">derivation</span>(<span class="ruby-value">1</span>) <span class="ruby-comment"># => [12, 45, ..., 23]</span>
|
459
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">formula</span>(<span class="ruby-value">1</span>) <span class="ruby-comment"># => "0.0167548964060689"</span>
|
460
|
-
|
461
|
-
<span class="ruby-comment"># Quadratic regression</span>
|
462
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>).<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">x</span> <span class="ruby-comment"># => [1, 2, ..., 120]</span>
|
463
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>).<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [43, 41, ..., 44]</span>
|
464
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>).<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [43, 41, ..., 44]</span>
|
465
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>).<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [23, 62, ..., 23]</span>
|
466
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>).<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [51, 22, ..., 15]</span>
|
467
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>).<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/"</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [78, 12, ..., 63]</span>
|
468
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>).<span class="ruby-identifier">benchmarks</span>(<span class="ruby-string">"index page"</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [12, 45, ..., 23]</span>
|
469
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>).<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">formula</span> <span class="ruby-comment"># => "33.00886000234 + 0.0167548964060689x^1 + 0.0167548964060689x^2"</span>
|
470
|
-
|
471
|
-
<span class="ruby-comment"># Different timebase clustering</span>
|
472
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, :<span class="ruby-identifier">timebase</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">x</span> <span class="ruby-comment"># => [0, 1]</span>
|
473
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, :<span class="ruby-identifier">timebase</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [24032, 21893]</span>
|
474
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, :<span class="ruby-identifier">timebase</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [43, 41]</span>
|
475
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, :<span class="ruby-identifier">timebase</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [43, 41]</span>
|
476
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, :<span class="ruby-identifier">timebase</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [23, 62]</span>
|
477
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, :<span class="ruby-identifier">timebase</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [51, 22]</span>
|
478
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, :<span class="ruby-identifier">timebase</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/"</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [78, 12]</span>
|
479
|
-
<span class="ruby-identifier">polynomial_regression</span>(:<span class="ruby-identifier">degree</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, :<span class="ruby-identifier">timebase</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">benchmarks</span>(<span class="ruby-string">"index page"</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [12, 45]</span>
|
480
|
-
</pre>
|
481
|
-
|
482
|
-
<h4 id="label-normal_distribution">normal_distribution</h4>
|
483
|
-
|
484
|
-
<p>The normal distribution method creates a Gaussian bell function that
|
485
|
-
visualizes the distribution of a special attribute. If you want to know if
|
486
|
-
all your requests take about the same time, or if they vary a lot this is
|
487
|
-
method to use. The x-values are automatically scaled to 4-times the
|
488
|
-
variance around the mean, so it should map the whole bell all the time.</p>
|
489
|
-
|
490
|
-
<pre class="ruby"><span class="ruby-comment"># Normal distribution without time clustering</span>
|
491
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">x</span> <span class="ruby-comment"># => [1, 2, ..., 120]</span>
|
492
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [45, 23, ..., 36]</span>
|
493
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">formula</span> <span class="ruby-comment"># => "(1 / (10.242257627240862 * sqrt(2*PI))) * exp(-1 * ((x - 2.04671984377919)^2) / (2*10.242257627240862))"</span>
|
494
|
-
|
495
|
-
<span class="ruby-comment"># Normal distribution with default time slicing of 1.second</span>
|
496
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [43, 45, ..., 62]</span>
|
497
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [23, 62, ..., 23]</span>
|
498
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [51, 22, ..., 15]</span>
|
499
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/"</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [78, 12, ..., 63]</span>
|
500
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">benchmarks</span>(<span class="ruby-string">"index page"</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [12, 45, ..., 23]</span>
|
501
|
-
|
502
|
-
<span class="ruby-comment"># Normal distribution with custom time slicing</span>
|
503
|
-
<span class="ruby-identifier">normal_distribution</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [43, 45, ..., 62]</span>
|
504
|
-
<span class="ruby-identifier">normal_distribution</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [23, 62, ..., 23]</span>
|
505
|
-
<span class="ruby-identifier">normal_distribution</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [51, 22, ..., 15]</span>
|
506
|
-
<span class="ruby-identifier">normal_distribution</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">paths</span>(<span class="ruby-string">"/"</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [78, 12, ..., 63]</span>
|
507
|
-
<span class="ruby-identifier">normal_distribution</span>(<span class="ruby-value">1</span>.<span class="ruby-identifier">minute</span>).<span class="ruby-identifier">benchmarks</span>(<span class="ruby-string">"index page"</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [12, 45, ..., 23]</span>
|
508
|
-
</pre>
|
509
|
-
|
510
|
-
<h4 id="label-scope_to_benchmark">scope_to_benchmark</h4>
|
511
|
-
|
512
|
-
<p>The scope_to_benchmark method lets you scope any result to a single
|
513
|
-
benchmark. The values computed in this block have entirely been created by
|
514
|
-
this benchmark.</p>
|
515
|
-
|
516
|
-
<pre class="ruby"><span class="ruby-comment"># Results for the index page benchmark</span>
|
517
|
-
<span class="ruby-identifier">scope_to_benchmark</span> <span class="ruby-string">"index page"</span> <span class="ruby-keyword">do</span>
|
518
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">durations</span> <span class="ruby-comment"># => [43, 96, ..., 41]</span>
|
519
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">requests</span> <span class="ruby-comment"># => [503, 541, ..., 511]</span>
|
520
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>) <span class="ruby-comment"># => [200, 204, ..., 209]</span>
|
521
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">post</span>) <span class="ruby-comment"># => [201, 102, ..., 401]</span>
|
522
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">x</span> <span class="ruby-comment"># => [1, 2, ..., 120]</span>
|
523
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [45, 23, ..., 36]</span>
|
524
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [43, 45, ..., 62]</span>
|
525
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [23, 62, ..., 23]</span>
|
526
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [51, 22, ..., 15]</span>
|
527
|
-
<span class="ruby-keyword">end</span>
|
338
|
+
<p><a href="BigBench.html">BigBench</a> automatically supports a great load of
|
339
|
+
functionality for every post processor it would need anyways. This
|
340
|
+
functionality is offered through the</p>
|
341
|
+
<ul><li>
|
342
|
+
<p><a
|
343
|
+
href="https://github.com/southdesign/bigbench/wiki/Post-Processor-Environment-API">Post
|
344
|
+
Processor Environment API</a></p>
|
345
|
+
</li></ul>
|
528
346
|
|
529
|
-
<
|
530
|
-
<span class="ruby-identifier">scope_to_benchmark</span> <span class="ruby-string">"login and logout"</span> <span class="ruby-keyword">do</span>
|
531
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">durations</span> <span class="ruby-comment"># => [43, 96, ..., 41]</span>
|
532
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">requests</span> <span class="ruby-comment"># => [300, 141, ..., 511]</span>
|
533
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>) <span class="ruby-comment"># => [100, 204, ..., 209]</span>
|
534
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">post</span>) <span class="ruby-comment"># => [101, 102, ..., 401]</span>
|
535
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">x</span> <span class="ruby-comment"># => [1, 2, ..., 120]</span>
|
536
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [45, 23, ..., 36]</span>
|
537
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [43, 45, ..., 62]</span>
|
538
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [23, 62, ..., 23]</span>
|
539
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [51, 22, ..., 15]</span>
|
540
|
-
<span class="ruby-keyword">end</span>
|
541
|
-
</pre>
|
347
|
+
<h3 id="label-Included+Post+Processors">Included Post Processors</h3>
|
542
348
|
|
543
|
-
<
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
<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>
|
551
|
-
<span class="ruby-identifier">benchmark</span>.<span class="ruby-identifier">name</span> <span class="ruby-comment"># => "index page" then "login and logout"</span>
|
552
|
-
|
553
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">durations</span> <span class="ruby-comment"># => [43, 96, ..., 41]</span>
|
554
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">requests</span> <span class="ruby-comment"># => [300, 141, ..., 511]</span>
|
555
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>) <span class="ruby-comment"># => [100, 204, ..., 209]</span>
|
556
|
-
<span class="ruby-identifier">cluster</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">post</span>) <span class="ruby-comment"># => [101, 102, ..., 401]</span>
|
557
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">x</span> <span class="ruby-comment"># => [1, 2, ..., 120]</span>
|
558
|
-
<span class="ruby-identifier">polynomial_regression</span>.<span class="ruby-identifier">durations</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [45, 23, ..., 36]</span>
|
559
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">requests</span>.<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [43, 45, ..., 62]</span>
|
560
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">methods</span>(:<span class="ruby-identifier">get</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [23, 62, ..., 23]</span>
|
561
|
-
<span class="ruby-identifier">normal_distribution</span>.<span class="ruby-identifier">statuses</span>(<span class="ruby-value">200</span>).<span class="ruby-identifier">y</span> <span class="ruby-comment"># => [51, 22, ..., 15]</span>
|
562
|
-
<span class="ruby-keyword">end</span>
|
563
|
-
</pre>
|
349
|
+
<p>By default <a href="BigBench.html">BigBench</a> ships with a few very
|
350
|
+
useful post processors that might already fit your needs perfectly. The
|
351
|
+
full list of included post processors is shown in the wiki:</p>
|
352
|
+
<ul><li>
|
353
|
+
<p><a href="https://github.com/southdesign/bigbench/wiki/Post-Processors">Post
|
354
|
+
Processors</a></p>
|
355
|
+
</li></ul>
|
564
356
|
|
565
357
|
<h3 id="label-Running+Post+Processors+separately">Running Post Processors separately</h3>
|
566
358
|
|
@@ -569,44 +361,13 @@ post processor you never even defined in the first place without collecting
|
|
569
361
|
the test data again like this:</p>
|
570
362
|
|
571
363
|
<pre># Re-run the postprocessors defined in example.rb
|
572
|
-
bigbench
|
364
|
+
bigbench process example.rb
|
573
365
|
|
574
366
|
# Run a separate post processor independently - the already defined post processors are ignored
|
575
|
-
bigbench
|
367
|
+
bigbench process example.rb statistics</pre>
|
576
368
|
|
577
369
|
<p>Contribute, create great post processors and send me a pull request!</p>
|
578
370
|
|
579
|
-
<h3 id="label-Statistics">Statistics</h3>
|
580
|
-
|
581
|
-
<p>The statistics post processor computes a simple overview of the benchmark
|
582
|
-
and prints it to the terminal like this:</p>
|
583
|
-
|
584
|
-
<pre>BigBench Statistics
|
585
|
-
+---------------------------+------------------+---------+
|
586
|
-
| Name | Value | Percent |
|
587
|
-
+---------------------------+------------------+---------+
|
588
|
-
| Total Requests: | 52,469 | 100% |
|
589
|
-
| Total Errors: | 0 | 0.0% |
|
590
|
-
| | | |
|
591
|
-
| Average Requests/Second: | 437 Requests/sec | |
|
592
|
-
| Average Request Duration: | 1 ms | |
|
593
|
-
| | | |
|
594
|
-
| Max Request Duration: | 181 ms | |
|
595
|
-
| Min Request Duration: | 1 ms | |
|
596
|
-
| | | |
|
597
|
-
| Status Codes: | | |
|
598
|
-
| 200 | 52469 | 100.0% |
|
599
|
-
| | | |
|
600
|
-
| HTTP Methods | | |
|
601
|
-
| get | 34980 | 66.7% |
|
602
|
-
| post | 17489 | 33.3% |
|
603
|
-
| | | |
|
604
|
-
| URL Paths: | | |
|
605
|
-
| / | 34979 | 66.7% |
|
606
|
-
| /basic/auth | 17490 | 33.3% |
|
607
|
-
+---------------------------+------------------+---------+
|
608
|
-
19 rows in set</pre>
|
609
|
-
|
610
371
|
<h2 id="label-Load+Comparison">Load Comparison</h2>
|
611
372
|
|
612
373
|
<p><a href="BigBench.html">BigBench</a> is awfully good at creating high loads
|
@@ -687,6 +448,15 @@ JMeter.</p>
|
|
687
448
|
|
688
449
|
<h2 id="label-Version+History">Version History</h2>
|
689
450
|
|
451
|
+
<h3 id="label-0.5">0.5</h3>
|
452
|
+
<ul><li>
|
453
|
+
<p>Changed <code>configure</code> syntax to a common ruby pattern block style</p>
|
454
|
+
</li><li>
|
455
|
+
<p>Refactored and simplified command line usage with thor</p>
|
456
|
+
</li><li>
|
457
|
+
<p>Added a generator for test files</p>
|
458
|
+
</li></ul>
|
459
|
+
|
690
460
|
<h3 id="label-0.4">0.4</h3>
|
691
461
|
<ul><li>
|
692
462
|
<p>Added command line tool to run the post processors again</p>
|