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.
- data/README.textile +103 -2
- data/bigbench.gemspec +5 -2
- data/doc/BigBench.html +167 -4
- data/doc/BigBench/Benchmark.html +12 -0
- data/doc/BigBench/Benchmark/Benchmark.html +12 -0
- data/doc/BigBench/Benchmark/Looper.html +12 -0
- data/doc/BigBench/Bot.html +12 -0
- data/doc/BigBench/Configuration.html +12 -0
- data/doc/BigBench/Configuration/Config.html +12 -0
- data/doc/BigBench/Configuration/InvalidOptions.html +12 -0
- data/doc/BigBench/Executor.html +12 -0
- data/doc/BigBench/Executor/InvalidCommand.html +12 -0
- data/doc/BigBench/Fragment.html +12 -0
- data/doc/BigBench/Fragment/Fragment.html +13 -1
- data/doc/BigBench/Output.html +12 -0
- data/doc/BigBench/PostProcessor.html +378 -0
- data/doc/BigBench/PostProcessor/Environment.html +243 -0
- data/doc/BigBench/PostProcessor/InvalidProcessor.html +231 -0
- data/doc/BigBench/PostProcessor/Processor.html +306 -0
- data/doc/BigBench/PostProcessor/Statistics.html +225 -0
- data/doc/BigBench/PostProcessor/Test.html +223 -0
- data/doc/BigBench/Runner.html +12 -0
- data/doc/BigBench/Runner/NoBenchmarksDefined.html +12 -0
- data/doc/BigBench/Store.html +12 -0
- data/doc/BigBench/Tracker.html +12 -0
- data/doc/BigBench/Tracker/Tracker.html +12 -0
- data/doc/EventMachineLoop.html +12 -0
- data/doc/Float.html +12 -0
- data/doc/Gemfile.html +12 -0
- data/doc/Helpers.html +12 -0
- data/doc/Object.html +12 -0
- data/doc/Rakefile.html +23 -9
- data/doc/created.rid +40 -36
- data/doc/index.html +12 -0
- data/doc/js/search_index.js +1 -1
- data/doc/lib/bigbench/help/executor_txt.html +12 -0
- data/doc/table_of_contents.html +62 -13
- data/lib/bigbench.rb +6 -3
- data/lib/bigbench/benchmark.rb +1 -2
- data/lib/bigbench/executor.rb +2 -0
- data/lib/bigbench/fragment.rb +1 -1
- data/lib/bigbench/post_processor.rb +206 -0
- data/lib/bigbench/post_processor/statistics.rb +123 -0
- data/lib/bigbench/version.rb +1 -1
- data/spec/helpers.rb +1 -0
- data/spec/post_processor_spec.rb +71 -0
- data/spec/post_processors/statistics_spec.rb +14 -0
- data/spec/tests/result.ljson +43 -0
- metadata +147 -30
@@ -121,6 +121,18 @@
|
|
121
121
|
|
122
122
|
<li><a href="../BigBench/Output.html">BigBench::Output</a>
|
123
123
|
|
124
|
+
<li><a href="../BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
125
|
+
|
126
|
+
<li><a href="../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
127
|
+
|
128
|
+
<li><a href="../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
129
|
+
|
130
|
+
<li><a href="../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
131
|
+
|
132
|
+
<li><a href="../BigBench/PostProcessor/Statistics.html">BigBench::PostProcessor::Statistics</a>
|
133
|
+
|
134
|
+
<li><a href="../BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
135
|
+
|
124
136
|
<li><a href="../BigBench/Runner.html">BigBench::Runner</a>
|
125
137
|
|
126
138
|
<li><a href="../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
@@ -127,6 +127,18 @@
|
|
127
127
|
|
128
128
|
<li><a href="../../BigBench/Output.html">BigBench::Output</a>
|
129
129
|
|
130
|
+
<li><a href="../../BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
131
|
+
|
132
|
+
<li><a href="../../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
133
|
+
|
134
|
+
<li><a href="../../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
135
|
+
|
136
|
+
<li><a href="../../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
137
|
+
|
138
|
+
<li><a href="../../BigBench/PostProcessor/Statistics.html">BigBench::PostProcessor::Statistics</a>
|
139
|
+
|
140
|
+
<li><a href="../../BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
141
|
+
|
130
142
|
<li><a href="../../BigBench/Runner.html">BigBench::Runner</a>
|
131
143
|
|
132
144
|
<li><a href="../../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
@@ -123,6 +123,18 @@
|
|
123
123
|
|
124
124
|
<li><a href="../../BigBench/Output.html">BigBench::Output</a>
|
125
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
|
+
|
126
138
|
<li><a href="../../BigBench/Runner.html">BigBench::Runner</a>
|
127
139
|
|
128
140
|
<li><a href="../../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
data/doc/BigBench/Executor.html
CHANGED
@@ -117,6 +117,18 @@
|
|
117
117
|
|
118
118
|
<li><a href="../BigBench/Output.html">BigBench::Output</a>
|
119
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
|
+
|
120
132
|
<li><a href="../BigBench/Runner.html">BigBench::Runner</a>
|
121
133
|
|
122
134
|
<li><a href="../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
@@ -123,6 +123,18 @@
|
|
123
123
|
|
124
124
|
<li><a href="../../BigBench/Output.html">BigBench::Output</a>
|
125
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
|
+
|
126
138
|
<li><a href="../../BigBench/Runner.html">BigBench::Runner</a>
|
127
139
|
|
128
140
|
<li><a href="../../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
data/doc/BigBench/Fragment.html
CHANGED
@@ -127,6 +127,18 @@
|
|
127
127
|
|
128
128
|
<li><a href="../BigBench/Output.html">BigBench::Output</a>
|
129
129
|
|
130
|
+
<li><a href="../BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
131
|
+
|
132
|
+
<li><a href="../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
133
|
+
|
134
|
+
<li><a href="../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
135
|
+
|
136
|
+
<li><a href="../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
137
|
+
|
138
|
+
<li><a href="../BigBench/PostProcessor/Statistics.html">BigBench::PostProcessor::Statistics</a>
|
139
|
+
|
140
|
+
<li><a href="../BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
141
|
+
|
130
142
|
<li><a href="../BigBench/Runner.html">BigBench::Runner</a>
|
131
143
|
|
132
144
|
<li><a href="../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
@@ -127,6 +127,18 @@
|
|
127
127
|
|
128
128
|
<li><a href="../../BigBench/Output.html">BigBench::Output</a>
|
129
129
|
|
130
|
+
<li><a href="../../BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
131
|
+
|
132
|
+
<li><a href="../../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
133
|
+
|
134
|
+
<li><a href="../../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
135
|
+
|
136
|
+
<li><a href="../../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
137
|
+
|
138
|
+
<li><a href="../../BigBench/PostProcessor/Statistics.html">BigBench::PostProcessor::Statistics</a>
|
139
|
+
|
140
|
+
<li><a href="../../BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
141
|
+
|
130
142
|
<li><a href="../../BigBench/Runner.html">BigBench::Runner</a>
|
131
143
|
|
132
144
|
<li><a href="../../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
@@ -345,7 +357,7 @@ block</p>
|
|
345
357
|
<span class="ruby-value">:url</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@uri</span>.<span class="ruby-identifier">to_s</span>,
|
346
358
|
<span class="ruby-value">:path</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@uri</span>.<span class="ruby-identifier">request_uri</span>,
|
347
359
|
<span class="ruby-value">:method</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@method</span>,
|
348
|
-
<span class="ruby-value">:status</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">http</span>.<span class="ruby-identifier">response_header</span>.<span class="ruby-identifier">status</span>
|
360
|
+
<span class="ruby-value">:status</span> =<span class="ruby-operator">></span> (<span class="ruby-identifier">s</span> = <span class="ruby-identifier">http</span>.<span class="ruby-identifier">response_header</span>.<span class="ruby-identifier">status</span>.<span class="ruby-identifier">to_i</span>; <span class="ruby-identifier">s</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">:</span> <span class="ruby-value">404</span>)
|
349
361
|
}
|
350
362
|
)
|
351
363
|
<span class="ruby-keyword">end</span></pre>
|
data/doc/BigBench/Output.html
CHANGED
@@ -145,6 +145,18 @@
|
|
145
145
|
|
146
146
|
<li><a href="../BigBench/Output.html">BigBench::Output</a>
|
147
147
|
|
148
|
+
<li><a href="../BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
149
|
+
|
150
|
+
<li><a href="../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
151
|
+
|
152
|
+
<li><a href="../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
153
|
+
|
154
|
+
<li><a href="../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
155
|
+
|
156
|
+
<li><a href="../BigBench/PostProcessor/Statistics.html">BigBench::PostProcessor::Statistics</a>
|
157
|
+
|
158
|
+
<li><a href="../BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
159
|
+
|
148
160
|
<li><a href="../BigBench/Runner.html">BigBench::Runner</a>
|
149
161
|
|
150
162
|
<li><a href="../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
@@ -0,0 +1,378 @@
|
|
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 - 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/statistics.rb
|
51
|
+
<li>lib/bigbench/post_processor.rb
|
52
|
+
</ul>
|
53
|
+
</nav>
|
54
|
+
|
55
|
+
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
<!-- Method Quickref -->
|
63
|
+
<nav id="method-list-section" class="section">
|
64
|
+
<h3 class="section-header">Methods</h3>
|
65
|
+
|
66
|
+
<ul class="link-list">
|
67
|
+
|
68
|
+
<li><a href="#method-c-add">::add</a>
|
69
|
+
|
70
|
+
<li><a href="#method-c-all">::all</a>
|
71
|
+
|
72
|
+
<li><a href="#method-c-reset-21">::reset!</a>
|
73
|
+
|
74
|
+
<li><a href="#method-c-run-21">::run!</a>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
</nav>
|
78
|
+
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<div id="project-metadata">
|
82
|
+
<nav id="fileindex-section" class="section project-section">
|
83
|
+
<h3 class="section-header">Pages</h3>
|
84
|
+
|
85
|
+
<ul>
|
86
|
+
|
87
|
+
<li class="file"><a href="../Gemfile.html">Gemfile</a>
|
88
|
+
|
89
|
+
<li class="file"><a href="../Rakefile.html">Rakefile</a>
|
90
|
+
|
91
|
+
<li class="file"><a href="../lib/bigbench/help/executor_txt.html">executor</a>
|
92
|
+
|
93
|
+
</ul>
|
94
|
+
</nav>
|
95
|
+
|
96
|
+
<nav id="classindex-section" class="section project-section">
|
97
|
+
<h3 class="section-header">Class and Module Index</h3>
|
98
|
+
|
99
|
+
<ul class="link-list">
|
100
|
+
|
101
|
+
<li><a href="../BigBench.html">BigBench</a>
|
102
|
+
|
103
|
+
<li><a href="../BigBench/Benchmark.html">BigBench::Benchmark</a>
|
104
|
+
|
105
|
+
<li><a href="../BigBench/Benchmark/Benchmark.html">BigBench::Benchmark::Benchmark</a>
|
106
|
+
|
107
|
+
<li><a href="../BigBench/Benchmark/Looper.html">BigBench::Benchmark::Looper</a>
|
108
|
+
|
109
|
+
<li><a href="../BigBench/Bot.html">BigBench::Bot</a>
|
110
|
+
|
111
|
+
<li><a href="../BigBench/Configuration.html">BigBench::Configuration</a>
|
112
|
+
|
113
|
+
<li><a href="../BigBench/Configuration/Config.html">BigBench::Configuration::Config</a>
|
114
|
+
|
115
|
+
<li><a href="../BigBench/Configuration/InvalidOptions.html">BigBench::Configuration::InvalidOptions</a>
|
116
|
+
|
117
|
+
<li><a href="../BigBench/Executor.html">BigBench::Executor</a>
|
118
|
+
|
119
|
+
<li><a href="../BigBench/Executor/InvalidCommand.html">BigBench::Executor::InvalidCommand</a>
|
120
|
+
|
121
|
+
<li><a href="../BigBench/Fragment.html">BigBench::Fragment</a>
|
122
|
+
|
123
|
+
<li><a href="../BigBench/Fragment/Fragment.html">BigBench::Fragment::Fragment</a>
|
124
|
+
|
125
|
+
<li><a href="../BigBench/Output.html">BigBench::Output</a>
|
126
|
+
|
127
|
+
<li><a href="../BigBench/PostProcessor.html">BigBench::PostProcessor</a>
|
128
|
+
|
129
|
+
<li><a href="../BigBench/PostProcessor/Environment.html">BigBench::PostProcessor::Environment</a>
|
130
|
+
|
131
|
+
<li><a href="../BigBench/PostProcessor/InvalidProcessor.html">BigBench::PostProcessor::InvalidProcessor</a>
|
132
|
+
|
133
|
+
<li><a href="../BigBench/PostProcessor/Processor.html">BigBench::PostProcessor::Processor</a>
|
134
|
+
|
135
|
+
<li><a href="../BigBench/PostProcessor/Statistics.html">BigBench::PostProcessor::Statistics</a>
|
136
|
+
|
137
|
+
<li><a href="../BigBench/PostProcessor/Test.html">BigBench::PostProcessor::Test</a>
|
138
|
+
|
139
|
+
<li><a href="../BigBench/Runner.html">BigBench::Runner</a>
|
140
|
+
|
141
|
+
<li><a href="../BigBench/Runner/NoBenchmarksDefined.html">BigBench::Runner::NoBenchmarksDefined</a>
|
142
|
+
|
143
|
+
<li><a href="../BigBench/Store.html">BigBench::Store</a>
|
144
|
+
|
145
|
+
<li><a href="../BigBench/Tracker.html">BigBench::Tracker</a>
|
146
|
+
|
147
|
+
<li><a href="../BigBench/Tracker/Tracker.html">BigBench::Tracker::Tracker</a>
|
148
|
+
|
149
|
+
<li><a href="../EventMachineLoop.html">EventMachineLoop</a>
|
150
|
+
|
151
|
+
<li><a href="../Float.html">Float</a>
|
152
|
+
|
153
|
+
<li><a href="../Helpers.html">Helpers</a>
|
154
|
+
|
155
|
+
<li><a href="../Object.html">Object</a>
|
156
|
+
|
157
|
+
</ul>
|
158
|
+
</nav>
|
159
|
+
|
160
|
+
</div>
|
161
|
+
</nav>
|
162
|
+
|
163
|
+
<div id="documentation">
|
164
|
+
<h1 class="module">module BigBench::PostProcessor</h1>
|
165
|
+
|
166
|
+
<div id="description" class="description">
|
167
|
+
|
168
|
+
<p>Post processors are run after all test are finished and the results are
|
169
|
+
written to the output file. A post processor can either be a block of code,
|
170
|
+
or an existing post processor module. To setup a post processor simply do
|
171
|
+
this:</p>
|
172
|
+
|
173
|
+
<pre>post_process do
|
174
|
+
# Some code that is executed after the tests, like a database update, twitter post, email etc.
|
175
|
+
end</pre>
|
176
|
+
|
177
|
+
<p>Or use one of the predefined post processor or write one yourself:</p>
|
178
|
+
|
179
|
+
<pre>post_process :statistics
|
180
|
+
post_process BigBench::PostProcessor::Statistics
|
181
|
+
post_process "statistics"</pre>
|
182
|
+
|
183
|
+
<p>All the upper lines include the same post processor. Symbols and strings
|
184
|
+
are camelized and constantized as the module name.</p>
|
185
|
+
|
186
|
+
<h2 id="label-Available+Methods+in+Processors">Available Methods in Processors</h2>
|
187
|
+
|
188
|
+
<p>Every post processor block or module supports the following methods and has
|
189
|
+
full <a
|
190
|
+
href="http://api.rubyonrails.org/classes/ActionView/Helpers.html">ActionView::Helper</a>
|
191
|
+
support.</p>
|
192
|
+
<dl class="rdoc-list label-list"><dt>each_tracking
|
193
|
+
<dd>
|
194
|
+
<p>A method that iterates through every collected tracking. It automatically
|
195
|
+
returns a hash with a single tracking of the following form:</p>
|
196
|
+
|
197
|
+
<pre class="ruby">{
|
198
|
+
:<span class="ruby-identifier">elapsed</span> =<span class="ruby-operator">></span> <span class="ruby-value">2.502132</span>,
|
199
|
+
:<span class="ruby-identifier">start</span> =<span class="ruby-operator">></span> <span class="ruby-value">1333986292.1755981</span>,
|
200
|
+
:<span class="ruby-identifier">stop</span> =<span class="ruby-operator">></span> <span class="ruby-value">1333986293.618884</span>,
|
201
|
+
:<span class="ruby-identifier">duration</span> =<span class="ruby-operator">></span> <span class="ruby-value">1443</span>,
|
202
|
+
:<span class="ruby-identifier">benchmark</span> =<span class="ruby-operator">></span> <span class="ruby-string">"index page"</span>,
|
203
|
+
:<span class="ruby-identifier">url</span> =<span class="ruby-operator">></span> <span class="ruby-string">"http://www.google.de/"</span>,
|
204
|
+
:<span class="ruby-identifier">path</span> =<span class="ruby-operator">></span> <span class="ruby-string">"/"</span>,
|
205
|
+
:<span class="ruby-identifier">method</span> =<span class="ruby-operator">></span> <span class="ruby-string">"get"</span>,
|
206
|
+
:<span class="ruby-identifier">status</span> =<span class="ruby-operator">></span> <span class="ruby-value">200</span>
|
207
|
+
}
|
208
|
+
</pre>
|
209
|
+
|
210
|
+
<p>It can be used like this:</p>
|
211
|
+
|
212
|
+
<pre class="ruby"><span class="ruby-identifier">post_process</span> <span class="ruby-keyword">do</span>
|
213
|
+
|
214
|
+
<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>
|
215
|
+
<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>
|
216
|
+
<span class="ruby-identifier">total_trackings</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
217
|
+
<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>
|
218
|
+
<span class="ruby-keyword">end</span>
|
219
|
+
|
220
|
+
<span class="ruby-constant">Twitter</span>.<span class="ruby-identifier">post</span> <span class="ruby-node">"Just run BigBench with #{total_trackings} trackings and #{total_errors} errors."</span>
|
221
|
+
|
222
|
+
<span class="ruby-keyword">end</span>
|
223
|
+
</pre>
|
224
|
+
</dd></dl>
|
225
|
+
|
226
|
+
</div><!-- description -->
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
<!-- Methods -->
|
241
|
+
|
242
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
243
|
+
<h3 class="section-header">Public Class Methods</h3>
|
244
|
+
|
245
|
+
|
246
|
+
<div id="method-c-add" class="method-detail ">
|
247
|
+
|
248
|
+
<div class="method-heading">
|
249
|
+
<span class="method-name">add</span><span
|
250
|
+
class="method-args">(processor = nil, &block)</span>
|
251
|
+
<span class="method-click-advice">click to toggle source</span>
|
252
|
+
</div>
|
253
|
+
|
254
|
+
|
255
|
+
<div class="method-description">
|
256
|
+
|
257
|
+
<p>Adds a new processor</p>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
<div class="method-source-code" id="add-source">
|
262
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line 96</span>
|
263
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">processor</span> = <span class="ruby-keyword">nil</span>, &<span class="ruby-identifier">block</span>)
|
264
|
+
<span class="ruby-ivar">@processors</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Processor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">processor</span>, &<span class="ruby-identifier">block</span>)
|
265
|
+
<span class="ruby-keyword">end</span></pre>
|
266
|
+
</div><!-- add-source -->
|
267
|
+
|
268
|
+
</div>
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
</div><!-- add-method -->
|
274
|
+
|
275
|
+
|
276
|
+
<div id="method-c-all" class="method-detail ">
|
277
|
+
|
278
|
+
<div class="method-heading">
|
279
|
+
<span class="method-name">all</span><span
|
280
|
+
class="method-args">()</span>
|
281
|
+
<span class="method-click-advice">click to toggle source</span>
|
282
|
+
</div>
|
283
|
+
|
284
|
+
|
285
|
+
<div class="method-description">
|
286
|
+
|
287
|
+
<p>Returns all initialized processors</p>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
<div class="method-source-code" id="all-source">
|
292
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line 101</span>
|
293
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">all</span>
|
294
|
+
<span class="ruby-ivar">@processors</span>
|
295
|
+
<span class="ruby-keyword">end</span></pre>
|
296
|
+
</div><!-- all-source -->
|
297
|
+
|
298
|
+
</div>
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
</div><!-- all-method -->
|
304
|
+
|
305
|
+
|
306
|
+
<div id="method-c-reset-21" class="method-detail ">
|
307
|
+
|
308
|
+
<div class="method-heading">
|
309
|
+
<span class="method-name">reset!</span><span
|
310
|
+
class="method-args">()</span>
|
311
|
+
<span class="method-click-advice">click to toggle source</span>
|
312
|
+
</div>
|
313
|
+
|
314
|
+
|
315
|
+
<div class="method-description">
|
316
|
+
|
317
|
+
<p>Resets all post processors</p>
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
<div class="method-source-code" id="reset-21-source">
|
322
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line 106</span>
|
323
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">reset!</span>
|
324
|
+
<span class="ruby-ivar">@processors</span> = []
|
325
|
+
<span class="ruby-keyword">end</span></pre>
|
326
|
+
</div><!-- reset-21-source -->
|
327
|
+
|
328
|
+
</div>
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
</div><!-- reset-21-method -->
|
334
|
+
|
335
|
+
|
336
|
+
<div id="method-c-run-21" class="method-detail ">
|
337
|
+
|
338
|
+
<div class="method-heading">
|
339
|
+
<span class="method-name">run!</span><span
|
340
|
+
class="method-args">()</span>
|
341
|
+
<span class="method-click-advice">click to toggle source</span>
|
342
|
+
</div>
|
343
|
+
|
344
|
+
|
345
|
+
<div class="method-description">
|
346
|
+
|
347
|
+
<p>Runs all post processors in the order they were defined</p>
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
<div class="method-source-code" id="run-21-source">
|
352
|
+
<pre><span class="ruby-comment"># File lib/bigbench/post_processor.rb, line 57</span>
|
353
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">run!</span>
|
354
|
+
<span class="ruby-identifier">all</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">processor</span><span class="ruby-operator">|</span> <span class="ruby-identifier">processor</span>.<span class="ruby-identifier">run!</span> }
|
355
|
+
<span class="ruby-keyword">end</span></pre>
|
356
|
+
</div><!-- run-21-source -->
|
357
|
+
|
358
|
+
</div>
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
</div><!-- run-21-method -->
|
364
|
+
|
365
|
+
|
366
|
+
</section><!-- public-class-method-details -->
|
367
|
+
|
368
|
+
</section><!-- 5Buntitled-5D -->
|
369
|
+
|
370
|
+
</div><!-- documentation -->
|
371
|
+
|
372
|
+
|
373
|
+
<footer id="validator-badges">
|
374
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
375
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
376
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
377
|
+
</footer>
|
378
|
+
|