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.
Files changed (77) hide show
  1. data/README.textile +29 -249
  2. data/bigbench.gemspec +1 -0
  3. data/bin/bigbench +1 -1
  4. data/dev/request_sequence.dot +235 -0
  5. data/dev/request_sequence.pdf +0 -0
  6. data/dev/sequence.rb +48 -0
  7. data/doc/Array.html +5 -5
  8. data/doc/BigBench.html +27 -60
  9. data/doc/BigBench/Benchmark.html +5 -5
  10. data/doc/BigBench/Benchmark/Benchmark.html +8 -8
  11. data/doc/BigBench/Benchmark/Looper.html +5 -5
  12. data/doc/BigBench/Bot.html +5 -5
  13. data/doc/BigBench/Configuration.html +29 -53
  14. data/doc/BigBench/Executor.html +14 -95
  15. data/doc/BigBench/Executor/Executable.html +551 -0
  16. data/doc/BigBench/Fragment.html +5 -5
  17. data/doc/BigBench/Fragment/Fragment.html +5 -5
  18. data/doc/BigBench/Output.html +7 -8
  19. data/doc/BigBench/PostProcessor.html +8 -8
  20. data/doc/BigBench/PostProcessor/Context.html +219 -0
  21. data/doc/BigBench/PostProcessor/Environment.html +5 -5
  22. data/doc/BigBench/PostProcessor/Environment/Appearings.html +5 -5
  23. data/doc/BigBench/PostProcessor/Environment/AttributeCluster.html +5 -5
  24. data/doc/BigBench/PostProcessor/Environment/BenchmarkNotFound.html +5 -5
  25. data/doc/BigBench/PostProcessor/Environment/Cluster.html +5 -5
  26. data/doc/BigBench/PostProcessor/Environment/NormalDistribution.html +5 -5
  27. data/doc/BigBench/PostProcessor/Environment/PolynomialRegression.html +5 -5
  28. data/doc/BigBench/PostProcessor/Environment/Statistics.html +5 -5
  29. data/doc/BigBench/PostProcessor/Graphs.html +5 -5
  30. data/doc/BigBench/PostProcessor/Graphs/LineGraph.html +5 -5
  31. data/doc/BigBench/PostProcessor/Graphs/PieGraph.html +5 -5
  32. data/doc/BigBench/PostProcessor/InvalidProcessor.html +6 -6
  33. data/doc/BigBench/PostProcessor/Processor.html +6 -6
  34. data/doc/BigBench/PostProcessor/Statistics.html +5 -5
  35. data/doc/BigBench/PostProcessor/Test.html +6 -6
  36. data/doc/BigBench/PostProcessor/TestPretty.html +249 -0
  37. data/doc/BigBench/Runner.html +5 -5
  38. data/doc/BigBench/Runner/NoBenchmarksDefined.html +5 -5
  39. data/doc/BigBench/Store.html +8 -8
  40. data/doc/BigBench/Tracker.html +5 -5
  41. data/doc/BigBench/Tracker/Tracker.html +5 -5
  42. data/doc/EventMachineLoop.html +5 -5
  43. data/doc/Float.html +5 -5
  44. data/doc/Gemfile.html +5 -5
  45. data/doc/Helpers.html +5 -5
  46. data/doc/Object.html +24 -5
  47. data/doc/README_rdoc.html +51 -281
  48. data/doc/Rakefile.html +5 -5
  49. data/doc/created.rid +46 -46
  50. data/doc/index.html +51 -281
  51. data/doc/js/search_index.js +1 -1
  52. data/doc/lib/bigbench/help/executor_txt.html +14 -29
  53. data/doc/table_of_contents.html +63 -68
  54. data/lib/bigbench.rb +2 -0
  55. data/lib/bigbench/benchmark.rb +3 -3
  56. data/lib/bigbench/configuration.rb +29 -68
  57. data/lib/bigbench/executor.rb +100 -130
  58. data/lib/bigbench/help/executor.txt +9 -22
  59. data/lib/bigbench/output.rb +2 -3
  60. data/lib/bigbench/post_processor.rb +16 -4
  61. data/lib/bigbench/runner.rb +0 -1
  62. data/lib/bigbench/store.rb +2 -2
  63. data/lib/bigbench/templates/test_plan.rb.erb +17 -0
  64. data/lib/bigbench/version.rb +1 -1
  65. data/spec/configure_spec.rb +7 -18
  66. data/spec/executor_spec.rb +25 -35
  67. data/spec/post_processor_spec.rb +31 -1
  68. data/spec/post_processors/environment_spec.rb +5 -3
  69. data/spec/post_processors/graphs_spec.rb +8 -3
  70. data/spec/post_processors/statistics_spec.rb +6 -1
  71. data/spec/runner_spec.rb +7 -6
  72. data/spec/store_spec.rb +4 -3
  73. data/spec/tests/local.rb +5 -5
  74. data/spec/tests/with_post_processor.rb +5 -5
  75. data/spec/tracker_spec.rb +12 -8
  76. metadata +48 -31
  77. data/dev/test.rb +0 -13
@@ -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/InvalidCommand.html">BigBench::Executor::InvalidCommand</a>
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>
@@ -1,46 +1,46 @@
1
- Sat, 28 Apr 2012 16:48:35 +0200
2
- ./bin/bigbench Sat, 21 Apr 2012 16:57:55 +0200
3
- ./dev/net_http.rb Sat, 21 Apr 2012 16:57:55 +0200
4
- ./dev/test.rb Sat, 21 Apr 2012 16:57:55 +0200
5
- ./dev/tracking.rb Sat, 21 Apr 2012 16:57:55 +0200
6
- ./Gemfile Sat, 21 Apr 2012 16:57:55 +0200
7
- ./lib/bigbench/benchmark/looper.rb Sat, 21 Apr 2012 16:57:55 +0200
8
- ./lib/bigbench/benchmark.rb Sat, 21 Apr 2012 16:57:55 +0200
9
- ./lib/bigbench/bot.rb Sat, 21 Apr 2012 16:57:55 +0200
10
- ./lib/bigbench/configuration.rb Sat, 21 Apr 2012 16:57:55 +0200
11
- ./lib/bigbench/executor.rb Sat, 28 Apr 2012 16:14:18 +0200
12
- ./lib/bigbench/float_extensions.rb Sat, 21 Apr 2012 16:57:55 +0200
13
- ./lib/bigbench/fragment.rb Sat, 21 Apr 2012 16:57:55 +0200
14
- ./lib/bigbench/help/executor.txt Sat, 21 Apr 2012 16:57:55 +0200
15
- ./lib/bigbench/initializers.rb Sat, 21 Apr 2012 16:57:55 +0200
16
- ./lib/bigbench/output.rb Sat, 21 Apr 2012 16:57:55 +0200
17
- ./lib/bigbench/post_processor/environment.rb Sat, 28 Apr 2012 15:52:51 +0200
18
- ./lib/bigbench/post_processor/graphs.rb Fri, 27 Apr 2012 04:13:00 +0200
19
- ./lib/bigbench/post_processor/statistics.rb Fri, 27 Apr 2012 05:58:34 +0200
20
- ./lib/bigbench/post_processor.rb Sat, 28 Apr 2012 16:35:04 +0200
21
- ./lib/bigbench/runner.rb Sat, 21 Apr 2012 16:57:55 +0200
22
- ./lib/bigbench/store.rb Sat, 21 Apr 2012 16:57:55 +0200
23
- ./lib/bigbench/tracker.rb Sat, 21 Apr 2012 16:57:55 +0200
24
- ./lib/bigbench/version.rb Sat, 21 Apr 2012 16:57:55 +0200
25
- ./lib/bigbench.rb Sat, 28 Apr 2012 16:04:25 +0200
26
- ./Rakefile Sat, 28 Apr 2012 16:43:58 +0200
27
- ./README.rdoc Sat, 28 Apr 2012 16:48:35 +0200
28
- ./spec/benchmark_spec.rb Sat, 21 Apr 2012 16:57:55 +0200
29
- ./spec/bot_spec.rb Sat, 21 Apr 2012 16:57:55 +0200
30
- ./spec/configure_spec.rb Sat, 21 Apr 2012 16:57:55 +0200
31
- ./spec/executor_spec.rb Sat, 21 Apr 2012 16:57:55 +0200
32
- ./spec/fragment_spec.rb Sat, 21 Apr 2012 16:57:55 +0200
33
- ./spec/helpers.rb Sat, 21 Apr 2012 16:57:55 +0200
34
- ./spec/lib/test_web_server.rb Sat, 21 Apr 2012 16:57:55 +0200
35
- ./spec/looper_spec.rb Sat, 21 Apr 2012 16:57:55 +0200
36
- ./spec/post_processor_spec.rb Sat, 21 Apr 2012 16:57:55 +0200
37
- ./spec/post_processors/environment_spec.rb Sat, 28 Apr 2012 16:04:45 +0200
38
- ./spec/post_processors/graphs_spec.rb Fri, 27 Apr 2012 05:06:24 +0200
39
- ./spec/post_processors/statistics_spec.rb Fri, 27 Apr 2012 05:59:02 +0200
40
- ./spec/runner_spec.rb Sat, 21 Apr 2012 16:57:55 +0200
41
- ./spec/store_spec.rb Sat, 21 Apr 2012 16:57:55 +0200
42
- ./spec/tests/local.rb Fri, 27 Apr 2012 04:21:33 +0200
43
- ./spec/tests/local_invalid.rb Sat, 21 Apr 2012 16:57:55 +0200
44
- ./spec/tests/with_post_processor.rb Fri, 27 Apr 2012 06:03:27 +0200
45
- ./spec/tracker_spec.rb Fri, 27 Apr 2012 04:23:22 +0200
46
- ./spec/webserver_spec.rb Sat, 21 Apr 2012 16:57:56 +0200
1
+ Wed, 16 May 2012 16:25:48 +0200
2
+ ./bin/bigbench Wed, 16 May 2012 14:45:40 +0200
3
+ ./dev/net_http.rb Sat, 28 Apr 2012 19:07:31 +0200
4
+ ./dev/sequence.rb Sat, 12 May 2012 16:52:27 +0200
5
+ ./dev/tracking.rb Sat, 28 Apr 2012 19:07:31 +0200
6
+ ./Gemfile Sat, 28 Apr 2012 19:07:31 +0200
7
+ ./lib/bigbench/benchmark/looper.rb Sat, 28 Apr 2012 19:07:31 +0200
8
+ ./lib/bigbench/benchmark.rb Wed, 16 May 2012 15:13:22 +0200
9
+ ./lib/bigbench/bot.rb Sat, 28 Apr 2012 19:07:31 +0200
10
+ ./lib/bigbench/configuration.rb Wed, 16 May 2012 11:17:27 +0200
11
+ ./lib/bigbench/executor.rb Wed, 16 May 2012 15:43:39 +0200
12
+ ./lib/bigbench/float_extensions.rb Sat, 28 Apr 2012 19:07:31 +0200
13
+ ./lib/bigbench/fragment.rb Sat, 28 Apr 2012 19:07:31 +0200
14
+ ./lib/bigbench/help/executor.txt Wed, 16 May 2012 16:15:51 +0200
15
+ ./lib/bigbench/initializers.rb Sat, 28 Apr 2012 19:07:31 +0200
16
+ ./lib/bigbench/output.rb Wed, 16 May 2012 14:59:21 +0200
17
+ ./lib/bigbench/post_processor/environment.rb Sat, 28 Apr 2012 19:07:31 +0200
18
+ ./lib/bigbench/post_processor/graphs.rb Sat, 28 Apr 2012 19:07:31 +0200
19
+ ./lib/bigbench/post_processor/statistics.rb Sat, 28 Apr 2012 19:07:31 +0200
20
+ ./lib/bigbench/post_processor.rb Wed, 16 May 2012 12:25:13 +0200
21
+ ./lib/bigbench/runner.rb Wed, 16 May 2012 11:20:47 +0200
22
+ ./lib/bigbench/store.rb Wed, 16 May 2012 14:51:38 +0200
23
+ ./lib/bigbench/tracker.rb Sat, 28 Apr 2012 19:07:31 +0200
24
+ ./lib/bigbench/version.rb Wed, 16 May 2012 10:54:34 +0200
25
+ ./lib/bigbench.rb Wed, 16 May 2012 15:43:25 +0200
26
+ ./Rakefile Sat, 28 Apr 2012 19:07:31 +0200
27
+ ./README.rdoc Wed, 16 May 2012 16:25:48 +0200
28
+ ./spec/benchmark_spec.rb Sat, 28 Apr 2012 19:07:31 +0200
29
+ ./spec/bot_spec.rb Sat, 28 Apr 2012 19:07:31 +0200
30
+ ./spec/configure_spec.rb Wed, 16 May 2012 11:09:35 +0200
31
+ ./spec/executor_spec.rb Wed, 16 May 2012 16:07:05 +0200
32
+ ./spec/fragment_spec.rb Sat, 28 Apr 2012 19:07:31 +0200
33
+ ./spec/helpers.rb Sat, 28 Apr 2012 19:07:31 +0200
34
+ ./spec/lib/test_web_server.rb Sat, 28 Apr 2012 19:07:31 +0200
35
+ ./spec/looper_spec.rb Sat, 28 Apr 2012 19:07:31 +0200
36
+ ./spec/post_processor_spec.rb Wed, 16 May 2012 16:12:38 +0200
37
+ ./spec/post_processors/environment_spec.rb Wed, 16 May 2012 16:11:32 +0200
38
+ ./spec/post_processors/graphs_spec.rb Wed, 16 May 2012 16:13:05 +0200
39
+ ./spec/post_processors/statistics_spec.rb Wed, 16 May 2012 16:13:17 +0200
40
+ ./spec/runner_spec.rb Wed, 16 May 2012 16:13:36 +0200
41
+ ./spec/store_spec.rb Wed, 16 May 2012 16:08:20 +0200
42
+ ./spec/tests/local.rb Wed, 16 May 2012 16:03:48 +0200
43
+ ./spec/tests/local_invalid.rb Sat, 28 Apr 2012 19:07:31 +0200
44
+ ./spec/tests/with_post_processor.rb Wed, 16 May 2012 16:04:01 +0200
45
+ ./spec/tracker_spec.rb Wed, 16 May 2012 16:03:34 +0200
46
+ ./spec/webserver_spec.rb Sat, 28 Apr 2012 19:07:31 +0200
@@ -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/InvalidCommand.html">BigBench::Executor::InvalidCommand</a>
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> =<span class="ruby-operator">></span> {
201
- :<span class="ruby-identifier">duration</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>.<span class="ruby-identifier">minutes</span>,
202
- :<span class="ruby-identifier">output</span> =<span class="ruby-operator">></span> <span class="ruby-string">&quot;example.ljson&quot;</span>,
203
- :<span class="ruby-identifier">users</span> =<span class="ruby-operator">></span> <span class="ruby-value">5</span>,
204
- :<span class="ruby-identifier">basic_auth</span> =<span class="ruby-operator">></span> [<span class="ruby-string">'username'</span>, <span class="ruby-string">'password'</span>]
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">&quot;example.ljson&quot;</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">&quot;default website pages&quot;</span> =<span class="ruby-operator">></span> <span class="ruby-string">&quot;http://localhost:3000&quot;</span> <span class="ruby-keyword">do</span>
208
208
  <span class="ruby-identifier">get</span> <span class="ruby-string">&quot;/&quot;</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 run local example.rb</pre>
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 start bot redis_url:port redis_password</pre>
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 run bots example.rb redis_url:port redis_password</pre>
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/images/structure.png" /></p>
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 a post processor. The basic structure is like this:</p>
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">&quot;index page&quot;</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">&quot;/&quot;</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">&quot;/&quot;</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">&quot;/logout&quot;</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">&quot;index&quot;</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">&quot;user&quot;</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">&quot;/&quot;</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">&quot;user&quot;</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">&quot;/&quot;</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">&quot;user&quot;</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"># => [&quot;get&quot;, &quot;post&quot;]</span>
431
- <span class="ruby-identifier">appearing</span>.<span class="ruby-identifier">paths</span> <span class="ruby-comment"># => [&quot;/&quot;, &quot;/basic/auth&quot;</span>
432
- </pre>
336
+ <h3 id="label-Post+Processor+Environment+API">Post Processor Environment API</h3>
433
337
 
434
- <h4 id="label-polynomial_regression">polynomial_regression</h4>
435
-
436
- <p>The polynomial regression creates a function that tries to map the test
437
- data best. With this function you have the ability do derivate and thereby
438
- plot the changes of the tested system over time. The degree of the
439
- regression can be freely chosen.</p>
440
-
441
- <pre class="ruby"><span class="ruby-comment"># Linear regression by default</span>
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">&quot;/&quot;</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">&quot;index page&quot;</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"># => &quot;43.00886000234 + 0.0167548964060689x^1&quot;</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">&quot;/&quot;</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">&quot;index page&quot;</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"># => &quot;0.0167548964060689&quot;</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">&quot;/&quot;</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">&quot;index page&quot;</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"># => &quot;33.00886000234 + 0.0167548964060689x^1 + 0.0167548964060689x^2&quot;</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">&quot;/&quot;</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">&quot;index page&quot;</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"># => &quot;(1 / (10.242257627240862 * sqrt(2*PI))) * exp(-1 * ((x - 2.04671984377919)^2) / (2*10.242257627240862))&quot;</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">&quot;/&quot;</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">&quot;index page&quot;</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">&quot;/&quot;</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">&quot;index page&quot;</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">&quot;index page&quot;</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
- <span class="ruby-comment"># Results for the login and logout benchmark</span>
530
- <span class="ruby-identifier">scope_to_benchmark</span> <span class="ruby-string">&quot;login and logout&quot;</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
- <h4 id="label-each_benchmark">each_benchmark</h4>
544
-
545
- <p>Iterates over all benchmarks and automatically scopes the results at each
546
- iteration to the current benchmark. This is useful if you want to access
547
- the detailed differences of each benchmark.</p>
548
-
549
- <pre class="ruby"><span class="ruby-comment"># Iterate over all benchmarks and calculate the results</span>
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"># => &quot;index page&quot; then &quot;login and logout&quot;</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 run postprocessors example.rb
364
+ bigbench process example.rb
573
365
 
574
366
  # Run a separate post processor independently - the already defined post processors are ignored
575
- bigbench run postprocessor example.rb statistics</pre>
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>