stella 0.7.0.014 → 0.7.0.015
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/Rudyfile +174 -0
- data/bin/stella +2 -1
- data/lib/stella.rb +1 -0
- data/lib/stella/engine.rb +14 -17
- data/lib/stella/engine/stress.rb +293 -0
- data/lib/stella/testplan/usecase.rb +2 -0
- data/lib/stella/version.rb +2 -2
- data/stella.gemspec +5 -2
- metadata +14 -2
data/Rudyfile
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
require 'stella'
|
2
|
+
|
3
|
+
machines do
|
4
|
+
|
5
|
+
region :'us-east-1' do
|
6
|
+
ami 'ami-e348af8a' # Alestic Debian 5.0, 32-bit (US)
|
7
|
+
end
|
8
|
+
region :'eu-west-1' do
|
9
|
+
ami 'ami-6ecde51a' # Alestic Debian 5.0, 32-bit (EU)
|
10
|
+
end
|
11
|
+
|
12
|
+
env :stage do
|
13
|
+
|
14
|
+
role :app do
|
15
|
+
user :root
|
16
|
+
size 'm1.small'
|
17
|
+
end
|
18
|
+
|
19
|
+
role :gen do
|
20
|
+
size 'm1.small'
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
commands do
|
30
|
+
allow :apt_get, "apt-get", :y, :q
|
31
|
+
allow :gem_install, "/usr/bin/gem", "install", :n, '/usr/bin', :y, :V, "--no-rdoc", "--no-ri"
|
32
|
+
allow :gem_sources, "/usr/bin/gem", "sources"
|
33
|
+
allow :gem_uninstall, "/usr/bin/gem", "uninstall", :V
|
34
|
+
allow :update_rubygems
|
35
|
+
allow :rake
|
36
|
+
allow :thin
|
37
|
+
allow :stella
|
38
|
+
allow :rm
|
39
|
+
allow :rackup_path do
|
40
|
+
"/usr/lib/ruby/gems/1.8/gems/stella/#{Stella::VERSION}/support/sample_webapp/config.ru"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
routines do
|
45
|
+
|
46
|
+
role :app do
|
47
|
+
|
48
|
+
start do
|
49
|
+
remote do
|
50
|
+
thin :d, :p, 3114, :R, rackup_path, 'start'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
stop do
|
55
|
+
remote do
|
56
|
+
thin :d, :p, 3114, :R, rackup_path, 'stop'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
role :gen do
|
63
|
+
|
64
|
+
# rudy -v -r gen verify ip-10-251-27-245.ec2.internal:3114
|
65
|
+
verify do
|
66
|
+
remote do |arg|
|
67
|
+
stella :v, 'verify', "#{arg.first}"
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# rudy -v -r gen stress ip-10-251-27-245.ec2.internal:3114
|
72
|
+
stress do
|
73
|
+
remote do |arg|
|
74
|
+
stella :v, 'stress', :c, 50, :r, 4, "#{arg.first}"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
|
80
|
+
setup do
|
81
|
+
after :sysupdate, :installdeps, :install_gem
|
82
|
+
end
|
83
|
+
|
84
|
+
shutdown do
|
85
|
+
end
|
86
|
+
|
87
|
+
reboot do
|
88
|
+
end
|
89
|
+
|
90
|
+
install_rubyforge do
|
91
|
+
remote :root do
|
92
|
+
gem_install 'stella', :V
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
install_github do
|
97
|
+
remote :root do
|
98
|
+
gem_sources :a, "http://gems.github.com"
|
99
|
+
gem_install 'solutious-stella'
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
package_gem do
|
104
|
+
local do
|
105
|
+
rm :r, :f, 'pkg'
|
106
|
+
rake 'package'
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
remove_rudy do
|
111
|
+
remote :root do
|
112
|
+
gem_uninstall 'stella'
|
113
|
+
rm :r, :f, '.stella'
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
install_gem do
|
118
|
+
before :package_gem
|
119
|
+
remote :root do
|
120
|
+
file_upload "pkg/stella-#{Stella::VERSION}.gem", "/tmp/"
|
121
|
+
gem_install "/tmp/stella-#{Stella::VERSION}.gem"
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
installdeps do
|
127
|
+
remote :root do
|
128
|
+
gem_install "test-spec", "rspec", "camping", "fcgi", "memcache-client"
|
129
|
+
gem_install "mongrel"
|
130
|
+
gem_install "ruby-openid", :v, "2.0.4" # thin requires 2.0.x
|
131
|
+
gem_install "rack", "thin", "sinatra"
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
install_ruby19 do
|
136
|
+
remote do
|
137
|
+
wget 'ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.bz2'
|
138
|
+
tar :x, :j, :v, :f, 'ruby-1.9.1-p243.tar.bz2'
|
139
|
+
cd 'ruby-1.9.1-p243'
|
140
|
+
configure '--prefix=/usr/local', '--enable-shared'
|
141
|
+
make
|
142
|
+
make 'install'
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
sysupdate do
|
147
|
+
remote :root do
|
148
|
+
apt_get "update"
|
149
|
+
apt_get "install", "libxml2-dev", "libxslt-dev"
|
150
|
+
apt_get "install", "build-essential", "git-core"
|
151
|
+
apt_get "install", "ruby1.8-dev", "rdoc", "libzlib-ruby", "rubygems"
|
152
|
+
apt_get "install", "libfcgi-dev", "libfcgi-ruby1.8"
|
153
|
+
gem_sources :a, "http://gems.github.com"
|
154
|
+
mkdir :p, "/var/lib/gems/1.8/bin" # Doesn't get created, but causes Rubygems to fail
|
155
|
+
gem_install "builder", "session"
|
156
|
+
gem_install 'hoe-seattlerb'
|
157
|
+
gem_install 'rubygems-update', "-v=1.3.4"
|
158
|
+
update_rubygems
|
159
|
+
gem_install 'hoe'
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
|
164
|
+
end
|
165
|
+
|
166
|
+
|
167
|
+
defaults do
|
168
|
+
zone :'us-east-1a'
|
169
|
+
environment :stage
|
170
|
+
role :app
|
171
|
+
color true
|
172
|
+
user :root
|
173
|
+
end
|
174
|
+
|
data/bin/stella
CHANGED
@@ -71,7 +71,8 @@ class Stella::CLI::Definition
|
|
71
71
|
about "Run a functional test"
|
72
72
|
usage "stella verify http://stellaaahhhh.com/"
|
73
73
|
usage "stella verify -p path/2/testplan.rb http://stellaaahhhh.com/"
|
74
|
-
option :
|
74
|
+
option :W, :nowait, "Ignore wait times"
|
75
|
+
option :w, :wait, Float, "Wait time (in seconds) between client requests (ignored if testplan supplied)"
|
75
76
|
option :p, :testplan, String, "Path to testplan"
|
76
77
|
command :verify => Stella::CLI
|
77
78
|
|
data/lib/stella.rb
CHANGED
data/lib/stella/engine.rb
CHANGED
@@ -2,22 +2,6 @@
|
|
2
2
|
|
3
3
|
module Stella::Engine
|
4
4
|
|
5
|
-
# These commented out timers are not very revealing.
|
6
|
-
#Benelux.add_timer Stella::Client, :execute
|
7
|
-
Benelux.add_counter Stella::Client, :execute_response_handler
|
8
|
-
#Benelux.add_timer HTTPClient, :create_request
|
9
|
-
|
10
|
-
# These timers are interesting from a reporting perspective.
|
11
|
-
Benelux.add_timer HTTPClient, :do_request
|
12
|
-
Benelux.add_timer HTTPClient::Session, :create_socket
|
13
|
-
Benelux.add_timer HTTPClient::Session, :create_ssl_socket
|
14
|
-
Benelux.add_timer HTTPClient::Session, :connect
|
15
|
-
Benelux.add_timer HTTPClient::Session, :query
|
16
|
-
Benelux.add_timer HTTPClient::Session, :socket_gets_first_byte
|
17
|
-
Benelux.add_timer HTTPClient::Session, :get_body
|
18
|
-
|
19
|
-
#Benelux.add_counter Stella::Client, :execute_response_handler
|
20
|
-
|
21
5
|
module Base
|
22
6
|
extend self
|
23
7
|
|
@@ -51,6 +35,19 @@ module Stella::Engine
|
|
51
35
|
def update_request_error(*args) raise end
|
52
36
|
|
53
37
|
end
|
38
|
+
|
39
|
+
Stella::Utils.require_glob(Stella::LIB_HOME, 'stella', 'engine', '*.rb')
|
40
|
+
|
41
|
+
|
42
|
+
# These timers are interesting from a reporting perspective.
|
43
|
+
Benelux.add_counter Stella::Client, :execute_response_handler
|
44
|
+
Benelux.add_timer HTTPClient, :do_request
|
45
|
+
Benelux.add_timer HTTPClient::Session, :create_socket
|
46
|
+
Benelux.add_timer HTTPClient::Session, :create_ssl_socket
|
47
|
+
Benelux.add_timer HTTPClient::Session, :connect
|
48
|
+
Benelux.add_timer HTTPClient::Session, :query
|
49
|
+
Benelux.add_timer HTTPClient::Session, :socket_gets_first_byte
|
50
|
+
Benelux.add_timer HTTPClient::Session, :get_body
|
51
|
+
|
54
52
|
end
|
55
53
|
|
56
|
-
Stella::Utils.require_glob(Stella::LIB_HOME, 'stella', 'engine', '*.rb')
|
@@ -0,0 +1,293 @@
|
|
1
|
+
|
2
|
+
module Stella::Engine
|
3
|
+
module Stress
|
4
|
+
extend Stella::Engine::Base
|
5
|
+
extend self
|
6
|
+
|
7
|
+
@timers = [:do_request]
|
8
|
+
@counts = [:response_content_size]
|
9
|
+
|
10
|
+
class << self
|
11
|
+
attr_accessor :timers, :counts
|
12
|
+
end
|
13
|
+
|
14
|
+
def run(plan, opts={})
|
15
|
+
opts = {
|
16
|
+
:hosts => [],
|
17
|
+
:clients => 1,
|
18
|
+
:duration => nil,
|
19
|
+
:repetitions => 1
|
20
|
+
}.merge! opts
|
21
|
+
opts[:clients] = plan.usecases.size if opts[:clients] < plan.usecases.size
|
22
|
+
opts[:clients] = 1000 if opts[:clients] > 1000
|
23
|
+
|
24
|
+
if Stella.loglev > 1
|
25
|
+
Stress.timers += [:connect, :create_socket, :query, :socket_gets_first_byte, :get_body]
|
26
|
+
Stress.counts = [:request_header_size, :request_content_size]
|
27
|
+
Stress.counts += [:response_headers_size, :response_content_size]
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
Stella.ld "OPTIONS: #{opts.inspect}"
|
32
|
+
Stella.li3 "Hosts: " << opts[:hosts].join(', ')
|
33
|
+
|
34
|
+
counts = calculate_usecase_clients plan, opts
|
35
|
+
|
36
|
+
Stella.li $/, "Preparing #{counts[:total]} virtual clients...", $/
|
37
|
+
Stella.lflush
|
38
|
+
packages = build_thread_package plan, opts, counts
|
39
|
+
|
40
|
+
Stella.li "Generating load...", $/
|
41
|
+
Stella.lflush
|
42
|
+
|
43
|
+
begin
|
44
|
+
execute_test_plan packages, opts[:repetitions]
|
45
|
+
rescue Interrupt
|
46
|
+
Stella.li "Stopping test...", $/
|
47
|
+
Stella.abort!
|
48
|
+
ensure
|
49
|
+
Stella.li "Processing statistics...", $/
|
50
|
+
Stella.lflush
|
51
|
+
|
52
|
+
|
53
|
+
wait_for_reporter
|
54
|
+
|
55
|
+
tt = Benelux.thread_timeline
|
56
|
+
test_time = tt.ranges(:execute_test_plan).first.duration
|
57
|
+
|
58
|
+
generate_report plan, test_time
|
59
|
+
|
60
|
+
# No need to add the main thread
|
61
|
+
# stats to the global timeline.
|
62
|
+
# Benelux.reporter.force_update
|
63
|
+
|
64
|
+
Stella.li "Overall time: "
|
65
|
+
Stella.li " prep: %10.2fs" % tt.ranges(:build_thread_package).first.duration
|
66
|
+
Stella.li " test: %10.2fs" % test_time
|
67
|
+
Stella.li " wait: %10.2fs" % tt.ranges(:wait_for_reporter).first.duration
|
68
|
+
Stella.li " post: %10.2fs" % tt.ranges(:generate_report).first.duration
|
69
|
+
Stella.li $/
|
70
|
+
end
|
71
|
+
|
72
|
+
# errors?
|
73
|
+
end
|
74
|
+
|
75
|
+
def wait_for_reporter
|
76
|
+
Benelux.reporter.wait
|
77
|
+
end
|
78
|
+
|
79
|
+
protected
|
80
|
+
class ThreadPackage
|
81
|
+
attr_accessor :index
|
82
|
+
attr_accessor :client
|
83
|
+
attr_accessor :usecase
|
84
|
+
def initialize(i, c, u)
|
85
|
+
@index, @client, @usecase = i, c, u
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def calculate_usecase_clients(plan, opts)
|
90
|
+
counts = { :total => 0 }
|
91
|
+
plan.usecases.each_with_index do |usecase,i|
|
92
|
+
count = case opts[:clients]
|
93
|
+
when 0..9
|
94
|
+
if (opts[:clients] % plan.usecases.size > 0)
|
95
|
+
msg = "Client count does not evenly match usecase count"
|
96
|
+
raise Stella::Testplan::WackyRatio, msg
|
97
|
+
else
|
98
|
+
(opts[:clients] / plan.usecases.size)
|
99
|
+
end
|
100
|
+
else
|
101
|
+
(opts[:clients] * usecase.ratio).to_i
|
102
|
+
end
|
103
|
+
counts[usecase.gibbler_cache] = count
|
104
|
+
counts[:total] += count
|
105
|
+
end
|
106
|
+
counts
|
107
|
+
end
|
108
|
+
|
109
|
+
def build_thread_package(plan, opts, counts)
|
110
|
+
packages, pointer = Array.new(counts[:total]), 0
|
111
|
+
plan.usecases.each do |usecase|
|
112
|
+
count = counts[usecase.gibbler_cache]
|
113
|
+
Stella.ld "THREAD PACKAGE: #{usecase.desc} (#{pointer} + #{count})"
|
114
|
+
# Fill the thread_package with the contents of the block
|
115
|
+
packages.fill(pointer, count) do |index|
|
116
|
+
Stella.li3 "Creating client ##{index+1} "
|
117
|
+
client = Stella::Client.new opts[:hosts].first, index+1
|
118
|
+
client.add_observer(self)
|
119
|
+
client.enable_nowait_mode
|
120
|
+
ThreadPackage.new(index+1, client, usecase)
|
121
|
+
end
|
122
|
+
pointer += count
|
123
|
+
end
|
124
|
+
packages.compact # TODO: Why one nil element sometimes?
|
125
|
+
end
|
126
|
+
|
127
|
+
def execute_test_plan(packages, reps=1)
|
128
|
+
Thread.ify packages, :threads => packages.size do |package|
|
129
|
+
|
130
|
+
# This thread will stay on this one track.
|
131
|
+
Benelux.current_track package.client.gibbler
|
132
|
+
Benelux.add_thread_tags :usecase => package.usecase.gibbler_cache
|
133
|
+
|
134
|
+
(1..reps).to_a.each do |rep|
|
135
|
+
Benelux.add_thread_tags :rep => rep
|
136
|
+
Stella::Engine::Stress.rescue(package.client.gibbler_cache) {
|
137
|
+
break if Stella.abort?
|
138
|
+
print '.' if Stella.loglev == 2
|
139
|
+
stats = package.client.execute package.usecase
|
140
|
+
}
|
141
|
+
Benelux.remove_thread_tags :rep
|
142
|
+
end
|
143
|
+
|
144
|
+
Benelux.remove_thread_tags :usecase
|
145
|
+
|
146
|
+
end
|
147
|
+
Stella.li2 $/, $/
|
148
|
+
end
|
149
|
+
|
150
|
+
def generate_report(plan,test_time)
|
151
|
+
#Benelux.update_all_track_timelines
|
152
|
+
global_timeline = Benelux.timeline
|
153
|
+
|
154
|
+
Stella.li $/, " %-72s ".att(:reverse) % ["#{plan.desc} (#{plan.gibbler_cache.shorter})"]
|
155
|
+
plan.usecases.uniq.each_with_index do |uc,i|
|
156
|
+
|
157
|
+
# TODO: Create Ranges object, like Stats object
|
158
|
+
# global_timeline.ranges(:do_request)[:usecase => '1111']
|
159
|
+
# The following returns globl do_request ranges.
|
160
|
+
requests = 0 #global_timeline.ranges(:do_request).size
|
161
|
+
|
162
|
+
desc = uc.desc || "Usecase ##{i+1} "
|
163
|
+
desc << " (#{uc.gibbler_cache.shorter}) "
|
164
|
+
str = ' ' << " %-66s %s %d%% ".bright.att(:reverse)
|
165
|
+
Stella.li str % [desc, '', uc.ratio_pretty]
|
166
|
+
|
167
|
+
uc.requests.each do |req|
|
168
|
+
filter = [uc.gibbler_cache, req.gibbler_cache]
|
169
|
+
desc = req.desc
|
170
|
+
Stella.li " %-72s ".bright % ["#{req.desc} (#{req.gibbler_cache.shorter})"]
|
171
|
+
Stella.li " %s" % [req.to_s]
|
172
|
+
Stress.timers.each do |sname|
|
173
|
+
stats = global_timeline.stats.group(sname)[filter]
|
174
|
+
str = ' %-30s %.3f <= ' << '%.3fs' << ' >= %.3f; %.3f(SD) %d(N)'
|
175
|
+
Stella.li str % [sname, stats.min, stats.mean, stats.max, stats.sd, stats.n]
|
176
|
+
Stella.lflush
|
177
|
+
end
|
178
|
+
Stella.li $/
|
179
|
+
end
|
180
|
+
|
181
|
+
Stella.li " Sub Total:".bright
|
182
|
+
|
183
|
+
stats = global_timeline.stats.group(:do_request)[uc.gibbler_cache]
|
184
|
+
failed = global_timeline.stats.group(:failed)[uc.gibbler_cache]
|
185
|
+
respgrp = global_timeline.stats.group(:execute_response_handler)[uc.gibbler_cache]
|
186
|
+
resst = respgrp.tag_values(:status)
|
187
|
+
statusi = []
|
188
|
+
resst.each do |status|
|
189
|
+
size = respgrp[:status => status].size
|
190
|
+
statusi << "#{status}: #{size}"
|
191
|
+
end
|
192
|
+
Stella.li ' %-30s %d (%s)' % ['Total requests', stats.n, statusi.join(', ')]
|
193
|
+
Stella.li ' %-29s %d' % [:success, stats.n - failed.n]
|
194
|
+
Stella.li ' %-29s %d' % [:failed, failed.n]
|
195
|
+
|
196
|
+
Stress.timers.each do |sname|
|
197
|
+
stats = global_timeline.stats.group(sname)[uc.gibbler_cache]
|
198
|
+
Stella.li ' %-30s %.3fs %.3f(SD)' % [sname, stats.mean, stats.sd]
|
199
|
+
Stella.lflush
|
200
|
+
end
|
201
|
+
|
202
|
+
Stress.counts.each do |sname|
|
203
|
+
stats = global_timeline.stats.group(sname)[uc.gibbler_cache]
|
204
|
+
Stella.li ' %-30s %-12s (avg:%s)' % [sname, stats.sum.to_bytes, stats.mean.to_bytes]
|
205
|
+
Stella.lflush
|
206
|
+
end
|
207
|
+
Stella.li $/
|
208
|
+
end
|
209
|
+
|
210
|
+
Stella.li ' ' << " %-66s ".att(:reverse) % 'Total:'
|
211
|
+
stats = global_timeline.stats.group(:do_request)
|
212
|
+
failed = global_timeline.stats.group(:failed)
|
213
|
+
respgrp = global_timeline.stats.group(:execute_response_handler)
|
214
|
+
resst = respgrp.tag_values(:status)
|
215
|
+
statusi = []
|
216
|
+
resst.each do |status|
|
217
|
+
size = respgrp[:status => status].size
|
218
|
+
statusi << [status, size]
|
219
|
+
end
|
220
|
+
Stella.li ' %-30s %d' % ['Total requests', stats.n]
|
221
|
+
success = stats.n - failed.n
|
222
|
+
Stella.li ' %-29s %d (req/s: %.2f)' % [:success, success, success/test_time]
|
223
|
+
statusi.each do |pair|
|
224
|
+
Stella.li2 ' %-28s %s: %d' % ['', *pair]
|
225
|
+
end
|
226
|
+
Stella.li ' %-29s %d' % [:failed, failed.n]
|
227
|
+
|
228
|
+
Stress.timers.each do |sname|
|
229
|
+
stats = global_timeline.stats.group(sname)
|
230
|
+
Stella.li ' %-30s %-.3fs %-.3f(SD)' % [sname, stats.mean, stats.sd]
|
231
|
+
Stella.lflush
|
232
|
+
end
|
233
|
+
|
234
|
+
Stress.counts.each do |sname|
|
235
|
+
stats = global_timeline.stats.group(sname)
|
236
|
+
Stella.li ' %-30s %-12s (avg:%s)' % [sname, stats.sum.to_bytes, stats.mean.to_bytes]
|
237
|
+
Stella.lflush
|
238
|
+
end
|
239
|
+
Stella.li $/
|
240
|
+
end
|
241
|
+
|
242
|
+
|
243
|
+
def update_prepare_request(client_id, usecase, req, counter)
|
244
|
+
|
245
|
+
end
|
246
|
+
|
247
|
+
def update_receive_response(client_id, usecase, uri, req, counter, container)
|
248
|
+
desc = "#{usecase.desc} > #{req.desc}"
|
249
|
+
Stella.li3 ' Client-%s %3d %-6s %-45s' % [client_id.shorter, container.status, req.http_method, uri]
|
250
|
+
end
|
251
|
+
|
252
|
+
def update_execute_response_handler(client_id, req, container)
|
253
|
+
end
|
254
|
+
|
255
|
+
def update_error_execute_response_handler(client_id, ex, req, container)
|
256
|
+
desc = "#{container.usecase.desc} > #{req.desc}"
|
257
|
+
Stella.li $/ if Stella.loglev == 1
|
258
|
+
Stella.le ' Client-%s %-45s %s' % [client_id.shorter, desc, ex.message]
|
259
|
+
Stella.li3 ex.backtrace
|
260
|
+
end
|
261
|
+
|
262
|
+
def update_request_error(client_id, usecase, uri, req, params, ex)
|
263
|
+
desc = "#{usecase.desc} > #{req.desc}"
|
264
|
+
Stella.li $/ if Stella.loglev == 1
|
265
|
+
Stella.le ' Client-%s %-45s %s' % [client_id.shorter, desc, ex.message]
|
266
|
+
Stella.li3 ex.backtrace
|
267
|
+
end
|
268
|
+
|
269
|
+
def update_quit_usecase client_id, msg
|
270
|
+
Stella.li3 " Client-%s QUIT %s" % [client_id.shorter, msg]
|
271
|
+
end
|
272
|
+
|
273
|
+
|
274
|
+
def update_repeat_request client_id, counter, total
|
275
|
+
Stella.li3 " Client-%s REPEAT %d of %d" % [client_id.shorter, counter, total]
|
276
|
+
end
|
277
|
+
|
278
|
+
def self.rescue(client_id, &blk)
|
279
|
+
blk.call
|
280
|
+
rescue => ex
|
281
|
+
Stella.le ' Error in Client-%s: %s' % [client_id.shorter, ex.message]
|
282
|
+
Stella.li3 ex.backtrace
|
283
|
+
end
|
284
|
+
|
285
|
+
|
286
|
+
Benelux.add_timer Stella::Engine::Stress, :build_thread_package
|
287
|
+
Benelux.add_timer Stella::Engine::Stress, :execute_test_plan
|
288
|
+
Benelux.add_timer Stella::Engine::Stress, :generate_report
|
289
|
+
Benelux.add_timer Stella::Engine::Stress, :wait_for_reporter
|
290
|
+
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
data/lib/stella/version.rb
CHANGED
@@ -6,9 +6,9 @@ module Stella
|
|
6
6
|
MAJOR = 0.freeze
|
7
7
|
MINOR = 7.freeze
|
8
8
|
TINY = 0.freeze
|
9
|
-
PATCH = '
|
9
|
+
PATCH = '015'.freeze
|
10
10
|
end
|
11
|
-
def self.to_s; [MAJOR, MINOR, TINY].join('.'); end
|
11
|
+
def self.to_s; [MAJOR, MINOR, TINY, PATCH].join('.'); end
|
12
12
|
def self.to_f; self.to_s.to_f; end
|
13
13
|
def self.patch; PATCH; end
|
14
14
|
end
|
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.015"
|
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"
|
@@ -15,9 +15,10 @@
|
|
15
15
|
|
16
16
|
s.executables = %w[stella]
|
17
17
|
|
18
|
-
s.add_dependency 'benelux', '>= 0.4.
|
18
|
+
s.add_dependency 'benelux', '>= 0.4.2'
|
19
19
|
s.add_dependency 'drydock', '>= 0.6.8'
|
20
20
|
s.add_dependency 'gibbler', '>= 0.6.3'
|
21
|
+
s.add_dependency 'sysinfo', '>= 0.7.0'
|
21
22
|
s.add_dependency 'storable', '>= 0.5.7'
|
22
23
|
s.add_dependency 'httpclient', '>= 2.1.5'
|
23
24
|
s.add_dependency 'nokogiri'
|
@@ -29,6 +30,7 @@
|
|
29
30
|
LICENSE.txt
|
30
31
|
README.rdoc
|
31
32
|
Rakefile
|
33
|
+
Rudyfile
|
32
34
|
bin/stella
|
33
35
|
examples/cookies/plan.rb
|
34
36
|
examples/essentials/logo.png
|
@@ -49,6 +51,7 @@
|
|
49
51
|
lib/stella/engine.rb
|
50
52
|
lib/stella/engine/functional.rb
|
51
53
|
lib/stella/engine/load.rb
|
54
|
+
lib/stella/engine/stress.rb
|
52
55
|
lib/stella/exceptions.rb
|
53
56
|
lib/stella/guidelines.rb
|
54
57
|
lib/stella/mixins.rb
|
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.015
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delano Mandelbaum
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.4.
|
23
|
+
version: 0.4.2
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: drydock
|
@@ -42,6 +42,16 @@ dependencies:
|
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 0.6.3
|
44
44
|
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: sysinfo
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.7.0
|
54
|
+
version:
|
45
55
|
- !ruby/object:Gem::Dependency
|
46
56
|
name: storable
|
47
57
|
type: :runtime
|
@@ -87,6 +97,7 @@ files:
|
|
87
97
|
- LICENSE.txt
|
88
98
|
- README.rdoc
|
89
99
|
- Rakefile
|
100
|
+
- Rudyfile
|
90
101
|
- bin/stella
|
91
102
|
- examples/cookies/plan.rb
|
92
103
|
- examples/essentials/logo.png
|
@@ -107,6 +118,7 @@ files:
|
|
107
118
|
- lib/stella/engine.rb
|
108
119
|
- lib/stella/engine/functional.rb
|
109
120
|
- lib/stella/engine/load.rb
|
121
|
+
- lib/stella/engine/stress.rb
|
110
122
|
- lib/stella/exceptions.rb
|
111
123
|
- lib/stella/guidelines.rb
|
112
124
|
- lib/stella/mixins.rb
|