bigbench 0.0.2 → 0.0.3

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 (49) hide show
  1. data/README.textile +103 -2
  2. data/bigbench.gemspec +5 -2
  3. data/doc/BigBench.html +167 -4
  4. data/doc/BigBench/Benchmark.html +12 -0
  5. data/doc/BigBench/Benchmark/Benchmark.html +12 -0
  6. data/doc/BigBench/Benchmark/Looper.html +12 -0
  7. data/doc/BigBench/Bot.html +12 -0
  8. data/doc/BigBench/Configuration.html +12 -0
  9. data/doc/BigBench/Configuration/Config.html +12 -0
  10. data/doc/BigBench/Configuration/InvalidOptions.html +12 -0
  11. data/doc/BigBench/Executor.html +12 -0
  12. data/doc/BigBench/Executor/InvalidCommand.html +12 -0
  13. data/doc/BigBench/Fragment.html +12 -0
  14. data/doc/BigBench/Fragment/Fragment.html +13 -1
  15. data/doc/BigBench/Output.html +12 -0
  16. data/doc/BigBench/PostProcessor.html +378 -0
  17. data/doc/BigBench/PostProcessor/Environment.html +243 -0
  18. data/doc/BigBench/PostProcessor/InvalidProcessor.html +231 -0
  19. data/doc/BigBench/PostProcessor/Processor.html +306 -0
  20. data/doc/BigBench/PostProcessor/Statistics.html +225 -0
  21. data/doc/BigBench/PostProcessor/Test.html +223 -0
  22. data/doc/BigBench/Runner.html +12 -0
  23. data/doc/BigBench/Runner/NoBenchmarksDefined.html +12 -0
  24. data/doc/BigBench/Store.html +12 -0
  25. data/doc/BigBench/Tracker.html +12 -0
  26. data/doc/BigBench/Tracker/Tracker.html +12 -0
  27. data/doc/EventMachineLoop.html +12 -0
  28. data/doc/Float.html +12 -0
  29. data/doc/Gemfile.html +12 -0
  30. data/doc/Helpers.html +12 -0
  31. data/doc/Object.html +12 -0
  32. data/doc/Rakefile.html +23 -9
  33. data/doc/created.rid +40 -36
  34. data/doc/index.html +12 -0
  35. data/doc/js/search_index.js +1 -1
  36. data/doc/lib/bigbench/help/executor_txt.html +12 -0
  37. data/doc/table_of_contents.html +62 -13
  38. data/lib/bigbench.rb +6 -3
  39. data/lib/bigbench/benchmark.rb +1 -2
  40. data/lib/bigbench/executor.rb +2 -0
  41. data/lib/bigbench/fragment.rb +1 -1
  42. data/lib/bigbench/post_processor.rb +206 -0
  43. data/lib/bigbench/post_processor/statistics.rb +123 -0
  44. data/lib/bigbench/version.rb +1 -1
  45. data/spec/helpers.rb +1 -0
  46. data/spec/post_processor_spec.rb +71 -0
  47. data/spec/post_processors/statistics_spec.rb +14 -0
  48. data/spec/tests/result.ljson +43 -0
  49. metadata +147 -30
@@ -0,0 +1,243 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>module BigBench::PostProcessor::Environment - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="module">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../../index.html">Home</a>
28
+ <a href="../../table_of_contents.html#classes">Classes</a>
29
+ <a href="../../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/bigbench/post_processor.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+
60
+
61
+ <!-- Method Quickref -->
62
+ <nav id="method-list-section" class="section">
63
+ <h3 class="section-header">Methods</h3>
64
+
65
+ <ul class="link-list">
66
+
67
+ <li><a href="#method-i-each_tracking">#each_tracking</a>
68
+
69
+ </ul>
70
+ </nav>
71
+
72
+ </div>
73
+
74
+ <div id="project-metadata">
75
+ <nav id="fileindex-section" class="section project-section">
76
+ <h3 class="section-header">Pages</h3>
77
+
78
+ <ul>
79
+
80
+ <li class="file"><a href="../../Gemfile.html">Gemfile</a>
81
+
82
+ <li class="file"><a href="../../Rakefile.html">Rakefile</a>
83
+
84
+ <li class="file"><a href="../../lib/bigbench/help/executor_txt.html">executor</a>
85
+
86
+ </ul>
87
+ </nav>
88
+
89
+ <nav id="classindex-section" class="section project-section">
90
+ <h3 class="section-header">Class and Module Index</h3>
91
+
92
+ <ul class="link-list">
93
+
94
+ <li><a href="../../BigBench.html">BigBench</a>
95
+
96
+ <li><a href="../../BigBench/Benchmark.html">BigBench::Benchmark</a>
97
+
98
+ <li><a href="../../BigBench/Benchmark/Benchmark.html">BigBench::Benchmark::Benchmark</a>
99
+
100
+ <li><a href="../../BigBench/Benchmark/Looper.html">BigBench::Benchmark::Looper</a>
101
+
102
+ <li><a href="../../BigBench/Bot.html">BigBench::Bot</a>
103
+
104
+ <li><a href="../../BigBench/Configuration.html">BigBench::Configuration</a>
105
+
106
+ <li><a href="../../BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
107
+
108
+ <li><a href="../../BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
109
+
110
+ <li><a href="../../BigBench/Executor.html">BigBench::Executor</a>
111
+
112
+ <li><a href="../../BigBench/Executor/InvalidCommand.html">BigBench::Executor::InvalidCommand</a>
113
+
114
+ <li><a href="../../BigBench/Fragment.html">BigBench::Fragment</a>
115
+
116
+ <li><a href="../../BigBench/Fragment/Fragment.html">BigBench::Fragment::Fragment</a>
117
+
118
+ <li><a href="../../BigBench/Output.html">BigBench::Output</a>
119
+
120
+ <li><a href="../../BigBench/PostProcessor.html">BigBench::PostProcessor</a>
121
+
122
+ <li><a href="../../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
123
+
124
+ <li><a href="../../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
125
+
126
+ <li><a href="../../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
127
+
128
+ <li><a href="../../BigBench/PostProcessor/Statistics.html">BigBench::PostProcessor::Statistics</a>
129
+
130
+ <li><a href="../../BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
131
+
132
+ <li><a href="../../BigBench/Runner.html">BigBench::Runner</a>
133
+
134
+ <li><a href="../../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
135
+
136
+ <li><a href="../../BigBench/Store.html">BigBench::Store</a>
137
+
138
+ <li><a href="../../BigBench/Tracker.html">BigBench::Tracker</a>
139
+
140
+ <li><a href="../../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
141
+
142
+ <li><a href="../../EventMachineLoop.html">EventMachineLoop</a>
143
+
144
+ <li><a href="../../Float.html">Float</a>
145
+
146
+ <li><a href="../../Helpers.html">Helpers</a>
147
+
148
+ <li><a href="../../Object.html">Object</a>
149
+
150
+ </ul>
151
+ </nav>
152
+
153
+ </div>
154
+ </nav>
155
+
156
+ <div id="documentation">
157
+ <h1 class="module">module BigBench::PostProcessor::Environment</h1>
158
+
159
+ <div id="description" class="description">
160
+
161
+ <p>The environment in which the post processors are evaluated. Every method
162
+ defined here is available in the post_process block and run! methods of the
163
+ predefined post processors</p>
164
+
165
+ </div><!-- description -->
166
+
167
+
168
+
169
+
170
+ <section id="5Buntitled-5D" class="documentation-section">
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+ <!-- Methods -->
180
+
181
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
182
+ <h3 class="section-header">Public Instance Methods</h3>
183
+
184
+
185
+ <div id="method-i-each_tracking" class="method-detail ">
186
+
187
+ <div class="method-heading">
188
+ <span class="method-name">each_tracking</span><span
189
+ class="method-args">() { |parse.inject({}){|memo,(k,v)| memo = v; memo}| ... }</span>
190
+ <span class="method-click-advice">click to toggle source</span>
191
+ </div>
192
+
193
+
194
+ <div class="method-description">
195
+
196
+ <p>Iterates through every tracking and returns a tracking hash of the
197
+ following form:</p>
198
+
199
+ <pre class="ruby">{
200
+ :<span class="ruby-identifier">elapsed</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">2.502132</span>,
201
+ :<span class="ruby-identifier">start</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1333986292.1755981</span>,
202
+ :<span class="ruby-identifier">stop</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1333986293.618884</span>,
203
+ :<span class="ruby-identifier">duration</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1443</span>,
204
+ :<span class="ruby-identifier">benchmark</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;index page&quot;</span>,
205
+ :<span class="ruby-identifier">url</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;http://www.google.de/&quot;</span>,
206
+ :<span class="ruby-identifier">path</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;/&quot;</span>,
207
+ :<span class="ruby-identifier">method</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;get&quot;</span>,
208
+ :<span class="ruby-identifier">status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">200</span>
209
+ }
210
+ </pre>
211
+
212
+
213
+
214
+ <div class="method-source-code" id="each_tracking-source">
215
+ <pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line 135</span>
216
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">each_tracking</span>
217
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-constant">BigBench</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">output</span>, <span class="ruby-string">&quot;r+&quot;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
218
+ <span class="ruby-identifier">file</span>.<span class="ruby-identifier">each_line</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-keyword">yield</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">line</span>).<span class="ruby-identifier">inject</span>({}){<span class="ruby-operator">|</span><span class="ruby-identifier">memo</span>,(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)<span class="ruby-operator">|</span> <span class="ruby-identifier">memo</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">v</span>; <span class="ruby-identifier">memo</span>} <span class="ruby-keyword">unless</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">blank?</span> }
219
+ <span class="ruby-keyword">end</span>
220
+ <span class="ruby-keyword">end</span></pre>
221
+ </div><!-- each_tracking-source -->
222
+
223
+ </div>
224
+
225
+
226
+
227
+
228
+ </div><!-- each_tracking-method -->
229
+
230
+
231
+ </section><!-- public-instance-method-details -->
232
+
233
+ </section><!-- 5Buntitled-5D -->
234
+
235
+ </div><!-- documentation -->
236
+
237
+
238
+ <footer id="validator-badges">
239
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
240
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
241
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
242
+ </footer>
243
+
@@ -0,0 +1,231 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class BigBench::PostProcessor::InvalidProcessor - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../../index.html">Home</a>
28
+ <a href="../../table_of_contents.html#classes">Classes</a>
29
+ <a href="../../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/bigbench/post_processor.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link">StandardError
63
+
64
+ </nav>
65
+
66
+
67
+ <!-- Method Quickref -->
68
+ <nav id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+ <li><a href="#method-i-message">#message</a>
74
+
75
+ </ul>
76
+ </nav>
77
+
78
+ </div>
79
+
80
+ <div id="project-metadata">
81
+ <nav id="fileindex-section" class="section project-section">
82
+ <h3 class="section-header">Pages</h3>
83
+
84
+ <ul>
85
+
86
+ <li class="file"><a href="../../Gemfile.html">Gemfile</a>
87
+
88
+ <li class="file"><a href="../../Rakefile.html">Rakefile</a>
89
+
90
+ <li class="file"><a href="../../lib/bigbench/help/executor_txt.html">executor</a>
91
+
92
+ </ul>
93
+ </nav>
94
+
95
+ <nav id="classindex-section" class="section project-section">
96
+ <h3 class="section-header">Class and Module Index</h3>
97
+
98
+ <ul class="link-list">
99
+
100
+ <li><a href="../../BigBench.html">BigBench</a>
101
+
102
+ <li><a href="../../BigBench/Benchmark.html">BigBench::Benchmark</a>
103
+
104
+ <li><a href="../../BigBench/Benchmark/Benchmark.html">BigBench::Benchmark::Benchmark</a>
105
+
106
+ <li><a href="../../BigBench/Benchmark/Looper.html">BigBench::Benchmark::Looper</a>
107
+
108
+ <li><a href="../../BigBench/Bot.html">BigBench::Bot</a>
109
+
110
+ <li><a href="../../BigBench/Configuration.html">BigBench::Configuration</a>
111
+
112
+ <li><a href="../../BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
113
+
114
+ <li><a href="../../BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
115
+
116
+ <li><a href="../../BigBench/Executor.html">BigBench::Executor</a>
117
+
118
+ <li><a href="../../BigBench/Executor/InvalidCommand.html">BigBench::Executor::InvalidCommand</a>
119
+
120
+ <li><a href="../../BigBench/Fragment.html">BigBench::Fragment</a>
121
+
122
+ <li><a href="../../BigBench/Fragment/Fragment.html">BigBench::Fragment::Fragment</a>
123
+
124
+ <li><a href="../../BigBench/Output.html">BigBench::Output</a>
125
+
126
+ <li><a href="../../BigBench/PostProcessor.html">BigBench::PostProcessor</a>
127
+
128
+ <li><a href="../../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
129
+
130
+ <li><a href="../../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
131
+
132
+ <li><a href="../../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
133
+
134
+ <li><a href="../../BigBench/PostProcessor/Statistics.html">BigBench::PostProcessor::Statistics</a>
135
+
136
+ <li><a href="../../BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
137
+
138
+ <li><a href="../../BigBench/Runner.html">BigBench::Runner</a>
139
+
140
+ <li><a href="../../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
141
+
142
+ <li><a href="../../BigBench/Store.html">BigBench::Store</a>
143
+
144
+ <li><a href="../../BigBench/Tracker.html">BigBench::Tracker</a>
145
+
146
+ <li><a href="../../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
147
+
148
+ <li><a href="../../EventMachineLoop.html">EventMachineLoop</a>
149
+
150
+ <li><a href="../../Float.html">Float</a>
151
+
152
+ <li><a href="../../Helpers.html">Helpers</a>
153
+
154
+ <li><a href="../../Object.html">Object</a>
155
+
156
+ </ul>
157
+ </nav>
158
+
159
+ </div>
160
+ </nav>
161
+
162
+ <div id="documentation">
163
+ <h1 class="class">class BigBench::PostProcessor::InvalidProcessor</h1>
164
+
165
+ <div id="description" class="description">
166
+
167
+ <p>Thrown if a processor wasn’t initialized the right way</p>
168
+
169
+ </div><!-- description -->
170
+
171
+
172
+
173
+
174
+ <section id="5Buntitled-5D" class="documentation-section">
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+ <!-- Methods -->
184
+
185
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
186
+ <h3 class="section-header">Public Instance Methods</h3>
187
+
188
+
189
+ <div id="method-i-message" class="method-detail ">
190
+
191
+ <div class="method-heading">
192
+ <span class="method-name">message</span><span
193
+ class="method-args">()</span>
194
+ <span class="method-click-advice">click to toggle source</span>
195
+ </div>
196
+
197
+
198
+ <div class="method-description">
199
+
200
+
201
+
202
+
203
+
204
+ <div class="method-source-code" id="message-source">
205
+ <pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line 112</span>
206
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">message</span>
207
+ <span class="ruby-string">&quot;You have to either specify a valid post processor or a block&quot;</span>
208
+ <span class="ruby-keyword">end</span></pre>
209
+ </div><!-- message-source -->
210
+
211
+ </div>
212
+
213
+
214
+
215
+
216
+ </div><!-- message-method -->
217
+
218
+
219
+ </section><!-- public-instance-method-details -->
220
+
221
+ </section><!-- 5Buntitled-5D -->
222
+
223
+ </div><!-- documentation -->
224
+
225
+
226
+ <footer id="validator-badges">
227
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
228
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
229
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
230
+ </footer>
231
+