stella 0.7.6.003 → 0.7.6.004
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -0
- data/bin/stella +7 -1
- data/lib/stella/cli.rb +5 -1
- data/lib/stella/client.rb +6 -4
- data/lib/stella/common.rb +8 -7
- data/lib/stella/engine/functional.rb +2 -2
- data/lib/stella/engine/loadbase.rb +1 -3
- data/lib/stella.rb +1 -1
- data/stella.gemspec +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -106,6 +106,7 @@ Get it in one of the following ways:
|
|
106
106
|
* Harm Aarts for the great test case and feedback!
|
107
107
|
* Kalin Harvey for keeping me on track.
|
108
108
|
* Dave L, the best intern money can't buy.
|
109
|
+
* Peter McCurdy for the feedback and bug fixes.
|
109
110
|
|
110
111
|
|
111
112
|
== License
|
data/bin/stella
CHANGED
@@ -42,7 +42,13 @@ class Stella::CLI::Definition
|
|
42
42
|
Drydock.debug true
|
43
43
|
Stella.enable_debug
|
44
44
|
end
|
45
|
-
global :
|
45
|
+
global :W, :wait, Integer, "Seconds to wait before starting test"
|
46
|
+
global :'no-header', "Do not include X-Stella-ID request header" do
|
47
|
+
true # params starting with 'no-' return false??
|
48
|
+
end
|
49
|
+
global :'no-param', "Do not include __stella query parameter header" do
|
50
|
+
true
|
51
|
+
end
|
46
52
|
global :E, :engine, String, "Specify a load engine (experimental)"
|
47
53
|
global :o, :output, String, "Write output to the given file" do |v|
|
48
54
|
String.disable_color
|
data/lib/stella/cli.rb
CHANGED
@@ -19,6 +19,9 @@ class Stella::CLI < Drydock::Command
|
|
19
19
|
opts = {}
|
20
20
|
opts[:hosts] = @hosts
|
21
21
|
opts[:nowait] = true if @option.nowait
|
22
|
+
[:'disable-templates', :'disable-stats', :'no-header', :'no-param'].each do |opt|
|
23
|
+
opts[opt] = @global.send(opt) unless @global.send(opt).nil?
|
24
|
+
end
|
22
25
|
ret = Stella::Engine::Functional.run @testplan, opts
|
23
26
|
@exit_code = (ret ? 0 : 1)
|
24
27
|
end
|
@@ -33,7 +36,8 @@ class Stella::CLI < Drydock::Command
|
|
33
36
|
[:nowait, :clients, :repetitions, :duration, :arrival].each do |opt|
|
34
37
|
opts[opt] = @option.send(opt) unless @option.send(opt).nil?
|
35
38
|
end
|
36
|
-
|
39
|
+
|
40
|
+
[:'disable-templates', :'disable-stats', :'no-header', :'no-param'].each do |opt|
|
37
41
|
opts[opt] = @global.send(opt) unless @global.send(opt).nil?
|
38
42
|
end
|
39
43
|
|
data/lib/stella/client.rb
CHANGED
@@ -18,7 +18,7 @@ module Stella
|
|
18
18
|
|
19
19
|
def initialize(base_uri=nil, client_id=1, opts={})
|
20
20
|
opts = {
|
21
|
-
:
|
21
|
+
:'disable-templates' => true
|
22
22
|
}.merge! opts
|
23
23
|
@opts = opts
|
24
24
|
@base_uri, @client_id = base_uri, client_id
|
@@ -72,8 +72,10 @@ module Stella
|
|
72
72
|
Benelux.add_thread_tags :retry => counter
|
73
73
|
Benelux.add_thread_tags :stella_id => stella_id
|
74
74
|
|
75
|
-
container.unique_id = stella_id
|
76
|
-
|
75
|
+
container.unique_id = stella_id[0..10]
|
76
|
+
|
77
|
+
params['__stella'] = container.unique_id unless @opts[:'no-param']
|
78
|
+
headers['X-Stella-ID'] = container.unique_id unless @opts[:'no-header']
|
77
79
|
|
78
80
|
meth = req.http_method.to_s.downcase
|
79
81
|
Stella.ld "#{req.http_method}: " << "#{req.uri} " << params.inspect
|
@@ -198,7 +200,7 @@ module Stella
|
|
198
200
|
#Stella.ld "PREPARE HEADERS: #{headers}"
|
199
201
|
hashobj.each_pair do |n,v|
|
200
202
|
v = container.instance_eval &v if v.is_a?(Proc)
|
201
|
-
if @opts[:
|
203
|
+
if @opts[:'disable-templates']
|
202
204
|
v = container.parse_template v if String === v
|
203
205
|
end
|
204
206
|
v = extra.call(v) unless extra.nil?
|
data/lib/stella/common.rb
CHANGED
@@ -137,10 +137,6 @@ class Stella::Config < Storable
|
|
137
137
|
field :apikey
|
138
138
|
field :secret
|
139
139
|
|
140
|
-
field :redis_host
|
141
|
-
field :redis_port
|
142
|
-
field :redis_pass
|
143
|
-
|
144
140
|
# Returns true when the current config matches the default config
|
145
141
|
def default?; to_hash.gibbler == DEFAULT_CONFIG_HASH; end
|
146
142
|
|
@@ -209,13 +205,18 @@ class Stella::Config < Storable
|
|
209
205
|
|
210
206
|
|
211
207
|
unless defined?(DIR_NAME)
|
212
|
-
|
213
|
-
|
208
|
+
if Stella.sysinfo.os == :windows
|
209
|
+
DIR_NAME = 'Stella'
|
210
|
+
USER_PATH = File.join(Stella.sysinfo.home, DIR_NAME, 'config.txt')
|
211
|
+
else
|
212
|
+
DIR_NAME = '.stella'
|
213
|
+
USER_PATH = File.join(Stella.sysinfo.home, DIR_NAME, 'config')
|
214
|
+
end
|
214
215
|
PROJECT_PATH = Stella::Config.find_project_config
|
215
216
|
DEFAULT_CONFIG = <<CONF
|
216
217
|
apikey: ''
|
217
218
|
secret: ''
|
218
|
-
|
219
|
+
source: api.solutious.com
|
219
220
|
CONF
|
220
221
|
DEFAULT_CONFIG_HASH = YAML.load(DEFAULT_CONFIG).gibbler
|
221
222
|
end
|
@@ -10,7 +10,7 @@ module Stella::Engine
|
|
10
10
|
Stella.ld "OPTIONS: #{opts.inspect}"
|
11
11
|
Stella.stdout.info2 "Hosts: " << opts[:hosts].join(', ') if !opts[:hosts].empty?
|
12
12
|
|
13
|
-
client = Stella::Client.new opts[:hosts].first
|
13
|
+
client = Stella::Client.new opts[:hosts].first, 1, opts
|
14
14
|
client.add_observer(self)
|
15
15
|
|
16
16
|
client.enable_nowait_mode if opts[:nowait]
|
@@ -61,7 +61,7 @@ module Stella::Engine
|
|
61
61
|
if req.http_method == 'POST'
|
62
62
|
cont = container.response.request.body.content
|
63
63
|
if String === cont
|
64
|
-
Stella.stdout.info3
|
64
|
+
Stella.stdout.info3(' ' << cont.split($/).join("#{$/} "))
|
65
65
|
elsif HTTP::Message::Body::Parts === cont
|
66
66
|
cont.parts.each do |part|
|
67
67
|
if File === part
|
@@ -183,9 +183,7 @@ module Stella::Engine
|
|
183
183
|
Stella.ld "THREAD PACKAGE: #{usecase.desc} (#{pointer} + #{count})"
|
184
184
|
# Fill the thread_package with the contents of the block
|
185
185
|
packages.fill(pointer, count) do |index|
|
186
|
-
|
187
|
-
copts[:parse_templates] = false if opts[:'disable-templates']
|
188
|
-
client = Stella::Client.new opts[:hosts].first, index+1, copts
|
186
|
+
client = Stella::Client.new opts[:hosts].first, index+1, opts
|
189
187
|
client.add_observer(self)
|
190
188
|
client.enable_nowait_mode if opts[:nowait]
|
191
189
|
Stella.stdout.info4 "Created client #{client.digest.short}"
|
data/lib/stella.rb
CHANGED
data/stella.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
@spec = Gem::Specification.new do |s|
|
2
2
|
s.name = "stella"
|
3
3
|
s.rubyforge_project = 'stella'
|
4
|
-
s.version = "0.7.6.
|
4
|
+
s.version = "0.7.6.004"
|
5
5
|
s.summary = "Blame Stella for breaking your web applications."
|
6
6
|
s.description = s.summary
|
7
7
|
s.author = "Delano Mandelbaum"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stella
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.6.
|
4
|
+
version: 0.7.6.004
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delano Mandelbaum
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-30 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|