stella 0.3.2 → 0.5.1

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 (100) hide show
  1. data/README.txt +24 -84
  2. data/Rakefile +1 -6
  3. data/doc/classes/Crypto.html +248 -0
  4. data/doc/classes/Crypto/Key.html +308 -0
  5. data/doc/classes/Enumerable.html +309 -0
  6. data/doc/classes/FileUtil.html +310 -0
  7. data/doc/classes/HTTPUtil.html +530 -0
  8. data/doc/classes/MathUtil.html +210 -0
  9. data/doc/classes/Stella.html +238 -0
  10. data/doc/classes/Stella/Adapter.html +127 -0
  11. data/doc/classes/Stella/Adapter/ApacheBench.html +1076 -0
  12. data/doc/classes/Stella/Adapter/Base.html +432 -0
  13. data/doc/classes/Stella/Adapter/CommandNotReady.html +146 -0
  14. data/doc/classes/Stella/Adapter/Httperf.html +949 -0
  15. data/doc/classes/Stella/Adapter/Siege.html +1011 -0
  16. data/doc/classes/Stella/CLI.html +914 -0
  17. data/doc/classes/Stella/CLI/Base.html +186 -0
  18. data/doc/classes/Stella/CLI/Language.html +149 -0
  19. data/doc/classes/Stella/CLI/LocalTest.html +268 -0
  20. data/doc/classes/Stella/Command.html +111 -0
  21. data/doc/classes/Stella/Command/Base.html +335 -0
  22. data/doc/classes/Stella/Config.html +292 -0
  23. data/doc/classes/Stella/InvalidArgument.html +242 -0
  24. data/doc/classes/Stella/LocalTest.html +450 -0
  25. data/doc/classes/Stella/Logger.html +548 -0
  26. data/doc/classes/Stella/Response.html +846 -0
  27. data/doc/classes/Stella/Storable.html +928 -0
  28. data/doc/classes/Stella/Test.html +142 -0
  29. data/doc/classes/Stella/Test/DaySummary.html +249 -0
  30. data/doc/classes/Stella/Test/Definition.html +294 -0
  31. data/doc/classes/Stella/Test/Definition/Rampup.html +215 -0
  32. data/doc/classes/Stella/Test/RunSummary.html +315 -0
  33. data/doc/classes/Stella/Test/SummaryBase.html +286 -0
  34. data/doc/classes/Stella/Test/TestSummary.html +200 -0
  35. data/doc/classes/Stella/Text.html +581 -0
  36. data/doc/classes/Stella/Text/Resource.html +289 -0
  37. data/doc/classes/Stella/UnavailableAdapter.html +242 -0
  38. data/doc/classes/Stella/UnknownValue.html +242 -0
  39. data/doc/classes/Stella/UnsupportedLanguage.html +115 -0
  40. data/doc/classes/Stella/Util.html +348 -0
  41. data/doc/classes/TextGraph.html +460 -0
  42. data/doc/classes/TimerUtil.html +431 -0
  43. data/doc/created.rid +1 -0
  44. data/doc/files/LICENSE_txt.html +129 -0
  45. data/doc/files/README_txt.html +209 -0
  46. data/doc/files/lib/stella/adapter/ab_rb.html +101 -0
  47. data/doc/files/lib/stella/adapter/base_rb.html +101 -0
  48. data/doc/files/lib/stella/adapter/httperf_rb.html +101 -0
  49. data/doc/files/lib/stella/adapter/siege_rb.html +101 -0
  50. data/doc/files/lib/stella/cli/base_rb.html +101 -0
  51. data/doc/files/lib/stella/cli/language_rb.html +101 -0
  52. data/doc/files/lib/stella/cli/localtest_rb.html +101 -0
  53. data/doc/files/lib/stella/cli_rb.html +112 -0
  54. data/doc/files/lib/stella/command/base_rb.html +101 -0
  55. data/doc/files/lib/stella/command/localtest_rb.html +101 -0
  56. data/doc/files/lib/stella/logger_rb.html +101 -0
  57. data/doc/files/lib/stella/response_rb.html +101 -0
  58. data/doc/files/lib/stella/storable_rb.html +109 -0
  59. data/doc/files/lib/stella/support_rb.html +101 -0
  60. data/doc/files/lib/stella/test/daysummary_rb.html +101 -0
  61. data/doc/files/lib/stella/test/definition_rb.html +101 -0
  62. data/doc/files/lib/stella/test/runsummary_rb.html +101 -0
  63. data/doc/files/lib/stella/test/summarybase_rb.html +101 -0
  64. data/doc/files/lib/stella/test/testsummary_rb.html +108 -0
  65. data/doc/files/lib/stella/text/resource_rb.html +108 -0
  66. data/doc/files/lib/stella/text_rb.html +108 -0
  67. data/doc/files/lib/stella_rb.html +128 -0
  68. data/doc/files/lib/utils/crypto-key_rb.html +116 -0
  69. data/doc/files/lib/utils/fileutil_rb.html +108 -0
  70. data/doc/files/lib/utils/httputil_rb.html +110 -0
  71. data/doc/files/lib/utils/mathutil_rb.html +101 -0
  72. data/doc/files/lib/utils/textgraph_rb.html +138 -0
  73. data/doc/files/lib/utils/timerutil_rb.html +108 -0
  74. data/doc/fr_class_index.html +66 -0
  75. data/doc/fr_file_index.html +62 -0
  76. data/doc/fr_method_index.html +309 -0
  77. data/doc/index.html +24 -0
  78. data/doc/rdoc-style.css +208 -0
  79. data/lib/stella.rb +5 -6
  80. data/lib/stella/adapter/ab.rb +4 -31
  81. data/lib/stella/adapter/base.rb +1 -15
  82. data/lib/stella/adapter/httperf.rb +4 -35
  83. data/lib/stella/adapter/siege.rb +29 -51
  84. data/lib/stella/cli.rb +22 -45
  85. data/lib/stella/cli/language.rb +0 -2
  86. data/lib/stella/cli/localtest.rb +0 -5
  87. data/lib/stella/command/base.rb +1 -1
  88. data/lib/stella/command/localtest.rb +68 -84
  89. data/lib/stella/test/daysummary.rb +93 -0
  90. data/lib/stella/test/definition.rb +5 -10
  91. data/lib/stella/test/{run/summary.rb → runsummary.rb} +6 -4
  92. data/lib/stella/test/{base.rb → summarybase.rb} +7 -3
  93. data/lib/stella/test/{summary.rb → testsummary.rb} +29 -27
  94. data/lib/utils/mathutil.rb +34 -36
  95. data/spec/base.rb +26 -0
  96. data/spec/shell_spec.rb +12 -0
  97. data/support/text/en.yaml +1 -7
  98. metadata +102 -8
  99. data/lib/stella/cli/agents.rb +0 -73
  100. data/lib/utils/escape.rb +0 -302
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
5
+
6
+ <!--
7
+
8
+ stella, a friend in performance testing
9
+
10
+ -->
11
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
12
+ <head>
13
+ <title>stella, a friend in performance testing</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
15
+ </head>
16
+ <frameset rows="20%, 80%">
17
+ <frameset cols="25%,35%,45%">
18
+ <frame src="fr_file_index.html" title="Files" name="Files" />
19
+ <frame src="fr_class_index.html" name="Classes" />
20
+ <frame src="fr_method_index.html" name="Methods" />
21
+ </frameset>
22
+ <frame src="files/LICENSE_txt.html" name="docwin" />
23
+ </frameset>
24
+ </html>
@@ -0,0 +1,208 @@
1
+
2
+ body {
3
+ font-family: Verdana,Arial,Helvetica,sans-serif;
4
+ font-size: 90%;
5
+ margin: 0;
6
+ margin-left: 40px;
7
+ padding: 0;
8
+ background: white;
9
+ }
10
+
11
+ h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
12
+ h1 { font-size: 150%; }
13
+ h2,h3,h4 { margin-top: 1em; }
14
+
15
+ a { background: #eef; color: #039; text-decoration: none; }
16
+ a:hover { background: #039; color: #eef; }
17
+
18
+ /* Override the base stylesheet's Anchor inside a table cell */
19
+ td > a {
20
+ background: transparent;
21
+ color: #039;
22
+ text-decoration: none;
23
+ }
24
+
25
+ /* and inside a section title */
26
+ .section-title > a {
27
+ background: transparent;
28
+ color: #eee;
29
+ text-decoration: none;
30
+ }
31
+
32
+ /* === Structural elements =================================== */
33
+
34
+ div#index {
35
+ margin: 0;
36
+ margin-left: -40px;
37
+ padding: 0;
38
+ font-size: 90%;
39
+ }
40
+
41
+
42
+ div#index a {
43
+ margin-left: 0.7em;
44
+ }
45
+
46
+ div#index .section-bar {
47
+ margin-left: 0px;
48
+ padding-left: 0.7em;
49
+ background: #ccc;
50
+ font-size: small;
51
+ }
52
+
53
+
54
+ div#classHeader, div#fileHeader {
55
+ width: auto;
56
+ color: white;
57
+ padding: 0.5em 1.5em 0.5em 1.5em;
58
+ margin: 0;
59
+ margin-left: -40px;
60
+ border-bottom: 3px solid #006;
61
+ }
62
+
63
+ div#classHeader a, div#fileHeader a {
64
+ background: inherit;
65
+ color: white;
66
+ }
67
+
68
+ div#classHeader td, div#fileHeader td {
69
+ background: inherit;
70
+ color: white;
71
+ }
72
+
73
+
74
+ div#fileHeader {
75
+ background: #057;
76
+ }
77
+
78
+ div#classHeader {
79
+ background: #048;
80
+ }
81
+
82
+
83
+ .class-name-in-header {
84
+ font-size: 180%;
85
+ font-weight: bold;
86
+ }
87
+
88
+
89
+ div#bodyContent {
90
+ padding: 0 1.5em 0 1.5em;
91
+ }
92
+
93
+ div#description {
94
+ padding: 0.5em 1.5em;
95
+ background: #efefef;
96
+ border: 1px dotted #999;
97
+ }
98
+
99
+ div#description h1,h2,h3,h4,h5,h6 {
100
+ color: #125;;
101
+ background: transparent;
102
+ }
103
+
104
+ div#validator-badges {
105
+ text-align: center;
106
+ }
107
+ div#validator-badges img { border: 0; }
108
+
109
+ div#copyright {
110
+ color: #333;
111
+ background: #efefef;
112
+ font: 0.75em sans-serif;
113
+ margin-top: 5em;
114
+ margin-bottom: 0;
115
+ padding: 0.5em 2em;
116
+ }
117
+
118
+
119
+ /* === Classes =================================== */
120
+
121
+ table.header-table {
122
+ color: white;
123
+ font-size: small;
124
+ }
125
+
126
+ .type-note {
127
+ font-size: small;
128
+ color: #DEDEDE;
129
+ }
130
+
131
+ .xxsection-bar {
132
+ background: #eee;
133
+ color: #333;
134
+ padding: 3px;
135
+ }
136
+
137
+ .section-bar {
138
+ color: #333;
139
+ border-bottom: 1px solid #999;
140
+ margin-left: -20px;
141
+ }
142
+
143
+
144
+ .section-title {
145
+ background: #79a;
146
+ color: #eee;
147
+ padding: 3px;
148
+ margin-top: 2em;
149
+ margin-left: -30px;
150
+ border: 1px solid #999;
151
+ }
152
+
153
+ .top-aligned-row { vertical-align: top }
154
+ .bottom-aligned-row { vertical-align: bottom }
155
+
156
+ /* --- Context section classes ----------------------- */
157
+
158
+ .context-row { }
159
+ .context-item-name { font-family: monospace; font-weight: bold; color: black; }
160
+ .context-item-value { font-size: small; color: #448; }
161
+ .context-item-desc { color: #333; padding-left: 2em; }
162
+
163
+ /* --- Method classes -------------------------- */
164
+ .method-detail {
165
+ background: #efefef;
166
+ padding: 0;
167
+ margin-top: 0.5em;
168
+ margin-bottom: 1em;
169
+ border: 1px dotted #ccc;
170
+ }
171
+ .method-heading {
172
+ color: black;
173
+ background: #ccc;
174
+ border-bottom: 1px solid #666;
175
+ padding: 0.2em 0.5em 0 0.5em;
176
+ }
177
+ .method-signature { color: black; background: inherit; }
178
+ .method-name { font-weight: bold; }
179
+ .method-args { font-style: italic; }
180
+ .method-description { padding: 0 0.5em 0 0.5em; }
181
+
182
+ /* --- Source code sections -------------------- */
183
+
184
+ a.source-toggle { font-size: 90%; }
185
+ div.method-source-code {
186
+ background: #262626;
187
+ color: #ffdead;
188
+ margin: 1em;
189
+ padding: 0.5em;
190
+ border: 1px dashed #999;
191
+ overflow: hidden;
192
+ }
193
+
194
+ div.method-source-code pre { color: #ffdead; overflow: hidden; }
195
+
196
+ /* --- Ruby keyword styles --------------------- */
197
+
198
+ .standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
199
+
200
+ .ruby-constant { color: #7fffd4; background: transparent; }
201
+ .ruby-keyword { color: #00ffff; background: transparent; }
202
+ .ruby-ivar { color: #eedd82; background: transparent; }
203
+ .ruby-operator { color: #00ffee; background: transparent; }
204
+ .ruby-identifier { color: #ffdead; background: transparent; }
205
+ .ruby-node { color: #ffa07a; background: transparent; }
206
+ .ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
207
+ .ruby-regexp { color: #ffa07a; background: transparent; }
208
+ .ruby-value { color: #7fffd4; background: transparent; }
@@ -10,7 +10,6 @@ require 'utils/httputil'
10
10
  require 'utils/crypto-key'
11
11
  require 'utils/fileutil'
12
12
  require 'utils/mathutil'
13
- require 'utils/escape'
14
13
 
15
14
  # Common dependencies
16
15
  require 'stella/support'
@@ -22,8 +21,8 @@ require 'stella/text'
22
21
  require 'stella/logger'
23
22
  require 'stella/response'
24
23
  require 'stella/test/definition'
25
- require 'stella/test/run/summary'
26
- require 'stella/test/summary'
24
+ require 'stella/test/runsummary'
25
+ require 'stella/test/testsummary'
27
26
 
28
27
  # Commands
29
28
  require 'stella/command/base'
@@ -39,13 +38,13 @@ require 'stella/adapter/httperf'
39
38
  # A friend in performance testing.
40
39
  #
41
40
  module Stella
42
- LOGGER = Stella::Logger.new(:debug=>false)
41
+ LOGGER = Stella::Logger.new(:debug=>true)
43
42
  TEXT = Stella::Text.new('en')
44
43
 
45
44
  module VERSION #:nodoc:
46
45
  MAJOR = 0.freeze unless defined? MAJOR
47
- MINOR = 3.freeze unless defined? MINOR
48
- TINY = 2.freeze unless defined? TINY
46
+ MINOR = 5.freeze unless defined? MINOR
47
+ TINY = 1.freeze unless defined? TINY
49
48
  def self.to_s
50
49
  [MAJOR, MINOR, TINY].join('.')
51
50
  end
@@ -86,9 +86,9 @@ module Stella
86
86
  # because it applies the load factor.
87
87
  value = self.send(canon)
88
88
  if (value.is_a? Array)
89
- value.each { |el| command << "-#{canon} #{EscapeUtil.shell_single_word(el.to_s)} " }
89
+ value.each { |el| command << "-#{cannon} '#{el}' " }
90
90
  else
91
- command << "-#{canon} #{EscapeUtil.shell_single_word(value.to_s)} "
91
+ command << "-#{canon} '#{value}' "
92
92
  end
93
93
 
94
94
  end
@@ -168,19 +168,7 @@ module Stella
168
168
 
169
169
 
170
170
 
171
- def add_header(name, value)
172
- @H ||= []
173
- @H << "#{name}: #{value}"
174
- end
175
-
176
- def user_agent=(list=[])
177
- return unless list && !list.empty?
178
- list = list.to_ary
179
- list.each do |agent|
180
- add_header("User-Agent", agent)
181
- end
182
- end
183
-
171
+
184
172
  def vusers
185
173
  c || 0
186
174
  end
@@ -252,22 +240,7 @@ module Stella
252
240
  raw[n.to_sym] = v.to_f unless raw.has_key? n.to_sym
253
241
  }
254
242
 
255
- # Document Path: /
256
- # Document Length: 96 bytes
257
- #
258
- # Concurrency Level: 75
259
- # Time taken for tests: 2.001 seconds
260
- # Complete requests: 750
261
- # Failed requests: 0
262
- # Write errors: 0
263
- # Total transferred: 174000 bytes
264
- # HTML transferred: 72000 bytes
265
- # Requests per second: 374.74 [#/sec] (mean)
266
- # Time per request: 200.138 [ms] (mean)
267
- # Time per request: 2.669 [ms] (mean, across all concurrent requests)
268
- # Transfer rate: 84.90 [Kbytes/sec] received
269
-
270
- stats = Stella::Test::Run::Summary.new
243
+ stats = Stella::Test::RunSummary.new
271
244
 
272
245
  unless raw.empty? || !raw.has_key?(:time_taken_for_tests)
273
246
 
@@ -60,27 +60,13 @@ module Stella::Adapter
60
60
  end
61
61
 
62
62
  def name
63
- @name
64
- end
65
-
66
- def rate
67
- 1
68
- end
69
- def vuser_rate
70
- "#{vusers}/#{rate}"
63
+ @command_name
71
64
  end
72
65
 
73
66
  def command
74
67
  raise Stella::TEXT.msg(:error_class_must_override, 'command')
75
68
  end
76
69
 
77
- def add_header
78
- raise Stella::TEXT.msg(:error_class_must_override, 'add_header')
79
- end
80
-
81
- def user_agent=
82
- raise Stella::TEXT.msg(:error_class_must_override, 'user_agent=')
83
- end
84
70
 
85
71
  end
86
72
  end
@@ -55,9 +55,9 @@ module Stella
55
55
  # because it applies the load factor.
56
56
  value = self.send(canon)
57
57
  if (value.is_a? Array)
58
- value.each { |el| command << "--#{canon.tr('_', '-')} #{EscapeUtil.shell_single_word(el.to_s)} " }
58
+ value.each { |el| command << "--#{canon.tr('_', '-')} '#{el}' " }
59
59
  else
60
- command << "--#{canon.tr('_', '-')} #{EscapeUtil.shell_single_word(value.to_s)} "
60
+ command << "--#{canon.tr('_', '-')} '#{value}' "
61
61
  end
62
62
 
63
63
  end
@@ -102,7 +102,7 @@ module Stella
102
102
 
103
103
  opts.on('--add-header=S', String) do |v| @add_header ||= []; @add_header << v; end
104
104
  opts.on('--burst-length=N', Integer) do |v| @burst_length = v end
105
- opts.on('--client=S', String) do |v| @client = v end
105
+ opts.on('--client=N', Integer) do |v| @client = v end
106
106
  opts.on('-d N', '--debug=N', Integer) do |v| @debug ||= 0; @debug = v end
107
107
  opts.on('--failure-status=N', Integer) do |v| @failure_status = v end
108
108
 
@@ -161,22 +161,6 @@ module Stella
161
161
  @name && !instance_variables.empty?
162
162
  end
163
163
 
164
- def add_header(name=false, value=false)
165
- # This is a hack since we have an instance variable called add_header.
166
- # I figure this is the best of two evils because I'd rather keep the
167
- # instance variable naming consistent.
168
- return @add_header if !name && !value
169
- @add_header ||= []
170
- @add_header << "#{name}: #{value}"
171
- end
172
-
173
- def user_agent=(list=[])
174
- return unless list && !list.empty?
175
- list = list.to_ary
176
- list.each do |agent|
177
- add_header("User-Agent", agent)
178
- end
179
- end
180
164
  def vusers
181
165
  @rate
182
166
  end
@@ -192,21 +176,6 @@ module Stella
192
176
  def vuser_requests
193
177
  0
194
178
  end
195
- def wsess
196
- @wsess.join(',')
197
- end
198
-
199
- def wset
200
- @wset.join(',')
201
- end
202
-
203
-
204
- def wsesslog
205
- @wsesslog.join(',')
206
- end
207
- def wlog
208
- @wlog.join(',')
209
- end
210
179
 
211
180
  #def concurrent
212
181
  # (@concurrent * @load_factor).to_i
@@ -266,7 +235,7 @@ module Stella
266
235
  return unless stats_file
267
236
 
268
237
  raw = stats_file.readlines.join
269
- stats = Stella::Test::Run::Summary.new
238
+ stats = Stella::Test::RunSummary.new
270
239
 
271
240
  raw.scan(/Request rate: (\d+?\.\d+?) req.s .(\d+?\.\d+?) ms.req./) do |rate,time|
272
241
  stats.transaction_rate = rate.to_f
@@ -95,9 +95,9 @@ module Stella
95
95
  # because it applies the load factor.
96
96
  value = self.send(canon)
97
97
  if (value.is_a? Array)
98
- value.each { |el| command << "--#{canon.tr('_', '-')} #{EscapeUtil.shell_single_word(el.to_s)} " }
98
+ value.each { |el| command << "--#{cannon.tr('_', '-')} '#{el}' " }
99
99
  else
100
- command << "--#{canon.tr('_', '-')} #{EscapeUtil.shell_single_word(value.to_s)} "
100
+ command << "--#{canon.tr('_', '-')} '#{value}' "
101
101
  end
102
102
 
103
103
  end
@@ -118,24 +118,24 @@ module Stella
118
118
  def process_options(arguments)
119
119
  options = OpenStruct.new
120
120
  opts = OptionParser.new
121
- opts.on('-V', '--version') do |v| @version = v end
122
- opts.on('-h', '--help') do |v| @help = v end
123
- opts.on('-C', '--config') do |v| @config = v end
124
- opts.on('-v', '--verbose') do |v| @verbose = v end
125
- opts.on('-g', '--get') do |v| @get = v end
126
- opts.on('-l', '--log') do |v| @log = v end
127
- opts.on('-m S', '--mark=S', String) do |v| @mark = v end
128
- opts.on('-d N', '--delay=N', Float) do |v| @delay = v end
129
- opts.on('-H S', '--header=S', String) do |v| @header ||= []; @header << v end
121
+ opts.on('-V', '--version') do |v| options.version = v end
122
+ opts.on('-h', '--help') do |v| options.help = v end
123
+ opts.on('-C', '--config') do |v| options.config = v end
124
+ opts.on('-v', '--verbose') do |v| options.verbose = v end
125
+ opts.on('-g', '--get') do |v| options.get = v end
126
+ opts.on('-l', '--log') do |v| options.log = v end
127
+ opts.on('-m S', '--mark=S', String) do |v| options.mark = v end
128
+ opts.on('-d N', '--delay=N', Float) do |v| options.delay = v end
129
+ opts.on('-H S', '--header=S', String) do |v| options.header ||= []; options.header << v end
130
130
 
131
- opts.on('-r N', '--reps=N', Integer) do |v| @reps = v.to_i end
132
- opts.on('-c N', '--concurrent=N', Integer) do |v| @concurrent = v.to_i end
133
- opts.on('-R S', '--rc=S', String) do |v| @rc = v end
134
- opts.on('-f S', '--file=S', String) do |v| @file = v end
135
- opts.on('-t S', '--time=S', String) do |v| @time = v end
136
- opts.on('-b', '--benchmark') do |v| @benchmark = true; end
137
- opts.on('-i', '--internet') do |v| @internet = true; end
138
- opts.on('-A S', '--user-agent=S', String) do |v| @user_agent ||= []; @user_agent << v end
131
+ opts.on('-r N', '--reps=N', Integer) do |v| options.reps = v.to_i end
132
+ opts.on('-c N', '--concurrent=N', Integer) do |v| options.concurrent = v.to_i end
133
+ opts.on('-R S', '--rc=S', String) do |v| options.rc = v end
134
+ opts.on('-f S', '--file=S', String) do |v| options.file = v end
135
+ opts.on('-t S', '--time=S', String) do |v| options.time = v end
136
+ opts.on('-b', '--benchmark') do |v| options.benchmark = true; end
137
+ opts.on('-i', '--internet') do |v| options.internet = true; end
138
+ opts.on('-A S', '--user-agent=S', String) do |v| options.user_agent = v end
139
139
 
140
140
  raise "You cannot select both --internet and --benchmark" if options.internet && options.benchmark
141
141
 
@@ -150,19 +150,7 @@ module Stella
150
150
  raise InvalidArgument.new(badarg)
151
151
  end
152
152
 
153
-
154
- def add_header(name, value)
155
- @header ||= []
156
- @header << "#{name}: #{value}"
157
- end
158
- def user_agent=(list=[])
159
- return unless list && !list.empty?
160
- list = list.to_ary
161
- @user_agent ||= []
162
- @user_agent << list
163
- @user_agent.flatten
164
- end
165
-
153
+
166
154
  def vusers
167
155
  concurrent || 0
168
156
  end
@@ -284,33 +272,23 @@ module Stella
284
272
  raw[n.to_sym] = v.to_f
285
273
  }
286
274
 
287
- stats = Stella::Test::Run::Summary.new
288
-
289
- # Transactions: 750 hits
290
- # Availability: 100.00 %
291
- # Elapsed time: 2.33 secs
292
- # Data transferred: 0.07 MB
293
- # Response time: 0.21 secs
294
- # Transaction rate: 321.89 trans/sec
295
- # Throughput: 0.03 MB/sec
296
- # Concurrency: 67.49
297
- # Successful transactions: 750
298
- # Failed transactions: 0
299
- # Longest transaction: 0.33
300
- # Shortest transaction: 0.10
301
-
275
+ stats = Stella::Test::RunSummary.new
276
+
302
277
  stats.vusers = raw[:concurrency]
303
278
  stats.data_transferred = raw[:data_transferred]
279
+
280
+
304
281
  stats.elapsed_time = raw[:elapsed_time]
305
282
  stats.response_time = raw[:response_time]
283
+
284
+ #stats.shortest_transaction = raw[:shortest_transaction]
285
+ #stats.longest_transaction = raw[:longest_transaction]
286
+
306
287
  stats.transactions = raw[:transactions].to_i
307
288
  stats.transaction_rate = raw[:transaction_rate]
308
289
  stats.failed = raw[:failed_transactions].to_i
309
290
  stats.successful = raw[:successful_transactions].to_i
310
-
311
- #stats.shortest_transaction = raw[:shortest_transaction]
312
- #stats.longest_transaction = raw[:longest_transaction]
313
-
291
+ #stats.raw = raw if @global_options.debug
314
292
  stats
315
293
  end
316
294