stella 0.7.0.017 → 0.7.0.018
Sign up to get free protection for your applications and to get access to all the features.
- data/Rudyfile +10 -5
- data/bin/stella +2 -2
- data/lib/stella.rb +1 -1
- data/lib/stella/cli.rb +1 -1
- data/lib/stella/client.rb +2 -1
- data/lib/stella/data.rb +6 -0
- data/lib/stella/engine/functional.rb +6 -1
- data/lib/stella/engine/load.rb +3 -3
- data/lib/stella/mixins/string.rb +5 -1
- data/lib/stella/version.rb +1 -1
- data/stella.gemspec +1 -1
- metadata +2 -2
data/Rudyfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'stella'
|
1
|
+
require 'stella'
|
2
2
|
|
3
3
|
machines do
|
4
4
|
|
@@ -37,7 +37,7 @@ commands do
|
|
37
37
|
allow :stella
|
38
38
|
allow :rm
|
39
39
|
allow :rackup_path do
|
40
|
-
"/usr/lib/ruby/gems/1.8/gems/stella
|
40
|
+
"/usr/lib/ruby/gems/1.8/gems/stella-#{Stella::VERSION}/support/sample_webapp/config.ru"
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
@@ -45,15 +45,19 @@ routines do
|
|
45
45
|
|
46
46
|
role :app do
|
47
47
|
|
48
|
+
# rudy -r app -v start
|
48
49
|
start do
|
49
50
|
remote do
|
50
|
-
thin :d, :p, 3114, :R, rackup_path, 'start'
|
51
|
+
thin :d, :l, 'thin.log', :p, 3114, :R, rackup_path, 'start'
|
51
52
|
end
|
52
53
|
end
|
53
54
|
|
55
|
+
# rudy -r app -v stop
|
54
56
|
stop do
|
55
57
|
remote do
|
56
|
-
thin :
|
58
|
+
thin :R, rackup_path, 'stop'
|
59
|
+
sleep 1
|
60
|
+
ps 'ux'
|
57
61
|
end
|
58
62
|
end
|
59
63
|
|
@@ -71,7 +75,7 @@ routines do
|
|
71
75
|
# rudy -v -r gen generate ip-10-251-27-245.ec2.internal:3114
|
72
76
|
generate do
|
73
77
|
remote do |arg|
|
74
|
-
stella :v, 'generate', :c,
|
78
|
+
stella :v, 'generate', :c, 200, :d, '30m', "#{arg.first}"
|
75
79
|
end
|
76
80
|
end
|
77
81
|
|
@@ -123,6 +127,7 @@ routines do
|
|
123
127
|
|
124
128
|
end
|
125
129
|
|
130
|
+
|
126
131
|
installdeps do
|
127
132
|
remote :root do
|
128
133
|
gem_install "test-spec", "rspec", "camping", "fcgi", "memcache-client"
|
data/bin/stella
CHANGED
@@ -53,7 +53,7 @@ class Stella::CLI::Definition
|
|
53
53
|
Stella.loglev += 1
|
54
54
|
end
|
55
55
|
global :V, :version, "Display version number" do
|
56
|
-
puts "Stella version: #{Stella::VERSION}
|
56
|
+
puts "Stella version: #{Stella::VERSION}"
|
57
57
|
exit 0
|
58
58
|
end
|
59
59
|
|
@@ -77,7 +77,7 @@ class Stella::CLI::Definition
|
|
77
77
|
about "Verify a test plan"
|
78
78
|
usage "stella verify [-p path/2/testplan.rb] URI"
|
79
79
|
usage "e.g."
|
80
|
-
usage " $stella verify -p path/2/testplan.rb http://stellaaahhhh.com/"
|
80
|
+
usage " $ stella verify -p path/2/testplan.rb http://stellaaahhhh.com/"
|
81
81
|
option :c, :clients, Integer, "Maximum number of virtual clients (ignored)"
|
82
82
|
option :r, :repetitions, Integer, "Number of times to repeat the testplan (ignored)"
|
83
83
|
option :d, :duration, String, "Max duration to run test (ignored)"
|
data/lib/stella.rb
CHANGED
data/lib/stella/cli.rb
CHANGED
@@ -69,7 +69,7 @@ class Stella::CLI < Drydock::Command
|
|
69
69
|
raise Stella::InvalidOption, "Bad path: #{@option.testplan}"
|
70
70
|
end
|
71
71
|
@hosts = @argv.collect { |uri|;
|
72
|
-
uri = 'http://' << uri unless uri.match /^
|
72
|
+
uri = 'http://' << uri unless uri.match /^https?:\/\//i
|
73
73
|
URI.parse uri;
|
74
74
|
}
|
75
75
|
if @option.testplan
|
data/lib/stella/client.rb
CHANGED
@@ -17,6 +17,7 @@ module Stella
|
|
17
17
|
|
18
18
|
def initialize(base_uri=nil, client_id=1)
|
19
19
|
@base_uri, @client_id = base_uri, client_id
|
20
|
+
|
20
21
|
#@cookie_file = File.new("cookies-#{client_id}", 'w')
|
21
22
|
@proxy = OpenStruct.new
|
22
23
|
end
|
@@ -95,7 +96,7 @@ module Stella
|
|
95
96
|
private
|
96
97
|
def send_request(http_client, usecase, meth, uri, req, params, headers, container, counter)
|
97
98
|
container.response = http_client.send(meth, uri, params, headers) # booya!
|
98
|
-
update(:receive_response, usecase, uri, req, counter, container)
|
99
|
+
update(:receive_response, usecase, uri, req, params, counter, container)
|
99
100
|
end
|
100
101
|
|
101
102
|
def update(kind, *args)
|
data/lib/stella/data.rb
CHANGED
@@ -43,11 +43,16 @@ module Stella::Engine
|
|
43
43
|
Stella.li2 " %-46s %16s ".bright % [desc, notice]
|
44
44
|
end
|
45
45
|
|
46
|
-
def update_receive_response(client_id, usecase, uri, req, counter, container)
|
46
|
+
def update_receive_response(client_id, usecase, uri, req, params, counter, container)
|
47
47
|
Stella.li ' %-59s %3d' % [uri, container.status]
|
48
48
|
|
49
49
|
Stella.li2 ' ' << container.response.request.header.send(:request_line)
|
50
50
|
|
51
|
+
Stella.li2 $/, " Request-Params:"
|
52
|
+
params.each do |pair|
|
53
|
+
Stella.li2 " %s: %s" % pair
|
54
|
+
end
|
55
|
+
|
51
56
|
Stella.li2 $/, " Request-Headers:"
|
52
57
|
container.response.request.header.all.each do |pair|
|
53
58
|
Stella.li2 " %s: %s" % pair
|
data/lib/stella/engine/load.rb
CHANGED
@@ -68,7 +68,7 @@ module Stella::Engine
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def wait_for_reporter
|
71
|
-
Benelux.reporter.
|
71
|
+
Benelux.reporter.force_update
|
72
72
|
end
|
73
73
|
|
74
74
|
protected
|
@@ -179,7 +179,7 @@ module Stella::Engine
|
|
179
179
|
time_elapsed = (Time.now - time_started).to_i
|
180
180
|
msg = "#{time_elapsed} of #{duration} (threads: %d)" % running_threads.size
|
181
181
|
Stella.li3 "*** TIME ELAPSED: #{msg} ***"
|
182
|
-
|
182
|
+
redo if time_elapsed <= duration
|
183
183
|
break if time_elapsed >= duration
|
184
184
|
end
|
185
185
|
|
@@ -292,7 +292,7 @@ module Stella::Engine
|
|
292
292
|
|
293
293
|
end
|
294
294
|
|
295
|
-
def update_receive_response(client_id, usecase, uri, req, counter, container)
|
295
|
+
def update_receive_response(client_id, usecase, uri, req, params, counter, container)
|
296
296
|
desc = "#{usecase.desc} > #{req.desc}"
|
297
297
|
Stella.li3 ' Client-%s %3d %-6s %-45s' % [client_id.shorter, container.status, req.http_method, uri]
|
298
298
|
end
|
data/lib/stella/mixins/string.rb
CHANGED
data/lib/stella/version.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.0.
|
4
|
+
s.version = "0.7.0.018"
|
5
5
|
s.summary = "Stella: Perform load tests on your web applications with beauty and brute strength."
|
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.0.
|
4
|
+
version: 0.7.0.018
|
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-10-
|
12
|
+
date: 2009-10-13 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|