stella 0.7.2.002 → 0.7.2.003

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.txt CHANGED
@@ -1,5 +1,10 @@
1
1
  STELLA, CHANGES
2
2
 
3
+ #### 0.7.3 (2009-10-30) ###############################
4
+
5
+ * ADDED: Arrival rate
6
+ * ADDED: Added HTTP auth per request
7
+
3
8
 
4
9
  #### 0.7.2 (2009-10-29) ###############################
5
10
 
data/bin/stella CHANGED
@@ -100,6 +100,7 @@ class Stella::CLI::Definition
100
100
  option :W, :nowait, "Ignore wait times"
101
101
  option :w, :wait, Float, "Wait time (in seconds) between client requests (ignored if testplan supplied)"
102
102
  option :p, :testplan, String, "Path to testplan"
103
+ option :a, :arrival, Float, "Arrival rate (new clients per second)"
103
104
  option :'disable-templates', "Disable template parsing"
104
105
  command :generate => Stella::CLI
105
106
 
data/lib/stella/cli.rb CHANGED
@@ -26,7 +26,7 @@ class Stella::CLI < Drydock::Command
26
26
  def generate
27
27
  opts = {}
28
28
  opts[:hosts] = @hosts
29
- [:nowait, :clients, :repetitions, :duration, :'disable-templates'].each do |opt|
29
+ [:nowait, :clients, :repetitions, :duration, :arrival, :'disable-templates'].each do |opt|
30
30
  opts[opt] = @option.send(opt) unless @option.send(opt).nil?
31
31
  end
32
32
 
data/lib/stella/client.rb CHANGED
@@ -58,7 +58,7 @@ module Stella
58
58
  user, pass = http_auth.user, http_auth.pass
59
59
  user = container.instance_eval &user if Proc === user
60
60
  pass = container.instance_eval &pass if Proc === pass
61
- Stella.li2 " AUTH (#{http_auth.kind}) #{domain} (#{user}/#{pass})"
61
+ Stella.li3 " AUTH (#{http_auth.kind}) #{domain} (#{user}/#{pass})"
62
62
  http_client.set_auth(domain, user, pass)
63
63
  end
64
64
 
data/lib/stella/engine.rb CHANGED
@@ -37,7 +37,7 @@ module Stella::Engine
37
37
  opts[:clients] = plan.usecases.size if opts[:clients] < plan.usecases.size
38
38
 
39
39
  if opts[:clients] > @@client_limit
40
- Stella.li3 "Client limit is #{@@client_limit}"
40
+ Stella.li2 "Client limit is #{@@client_limit}"
41
41
  opts[:clients] = @@client_limit
42
42
  end
43
43
 
@@ -5,7 +5,7 @@ module Stella::Engine
5
5
  extend Stella::Engine::Load
6
6
  extend self
7
7
  ROTATE_TIMELINE = 15
8
- def execute_test_plan(packages, reps=1,duration=0)
8
+ def execute_test_plan(packages, reps=1,duration=0,arrival=nil)
9
9
  time_started = Time.now
10
10
 
11
11
  pqueue = Queue.new
@@ -38,7 +38,7 @@ module Stella::Engine
38
38
  #Stella.li [package.client.gibbler.shorter, package.usecase.gibbler.shorter, rep].inspect
39
39
  Stella::Engine::Load.rescue(c.digest_cache) {
40
40
  break if Stella.abort?
41
- print '.' if Stella.loglev == 2
41
+ print '.' if Stella.loglev == 1
42
42
  stats = c.execute uc
43
43
  }
44
44
  Benelux.remove_thread_tags :rep
@@ -69,6 +69,13 @@ module Stella::Engine
69
69
 
70
70
  pqueue << package # return the package to the queue
71
71
  end
72
+
73
+ unless arrival.nil?
74
+ # Create 1 second / users per second
75
+ args = [1/arrival, @threads.size, packages.size]
76
+ Stella.li2 $/, "======== ARRIVAL (%s): %s of %s" % args
77
+ sleep 1/arrival
78
+ end
72
79
  }
73
80
 
74
81
  data_dumper = Thread.new do
@@ -15,7 +15,7 @@ module Stella::Engine
15
15
  opts = process_options! plan, opts
16
16
  @threads, @max_clients, @real_reps = [], 0, 0
17
17
 
18
- if Stella.loglev > 1
18
+ if Stella.loglev > 2
19
19
  Load.timers += [:query, :connect, :socket_gets_first_byte, :get_body]
20
20
  Load.counts = [:request_header_size, :request_content_size]
21
21
  Load.counts += [:response_headers_size, :response_content_size]
@@ -39,7 +39,7 @@ module Stella::Engine
39
39
  bt = Benelux.timeline
40
40
 
41
41
  begin
42
- execute_test_plan packages, opts[:repetitions], opts[:duration]
42
+ execute_test_plan packages, opts[:repetitions], opts[:duration], opts[:arrival]
43
43
  rescue Interrupt
44
44
  Stella.li "Stopping test...", $/
45
45
  Stella.abort!
@@ -210,7 +210,7 @@ module Stella::Engine
210
210
  success = global_stats.n - failed.n
211
211
  Stella.li ' %-29s %d (req/s: %.2f)' % [:success, success, success/test_time]
212
212
  statusi.each do |pair|
213
- Stella.li2 ' %-28s %s: %d' % ['', *pair]
213
+ Stella.li3 ' %-28s %s: %d' % ['', *pair]
214
214
  end
215
215
  Stella.li ' %-29s %d' % [:failed, failed.n]
216
216
 
@@ -236,7 +236,7 @@ module Stella::Engine
236
236
  def update_receive_response(client_id, usecase, uri, req, params, counter, container)
237
237
  desc = "#{usecase.desc} > #{req.desc}"
238
238
  args = [client_id.shorter, container.status, req.http_method, uri, params.inspect]
239
- Stella.li3 ' Client-%s %3d %-6s %s %s' % args
239
+ Stella.li2 ' Client-%s %3d %-6s %s %s' % args
240
240
  Stella.ld ' Client-%s %3d %s' % [client_id.shorter, container.status, container.body]
241
241
  end
242
242
 
@@ -258,15 +258,15 @@ module Stella::Engine
258
258
  end
259
259
 
260
260
  def update_quit_usecase client_id, msg
261
- Stella.li3 " Client-%s QUIT %s" % [client_id.shorter, msg]
261
+ Stella.li2 " Client-%s QUIT %s" % [client_id.shorter, msg]
262
262
  end
263
263
 
264
264
  def update_fail_request client_id, msg
265
- Stella.li3 " Client-%s FAILED %s" % [client_id.shorter, msg]
265
+ Stella.li2 " Client-%s FAILED %s" % [client_id.shorter, msg]
266
266
  end
267
267
 
268
268
  def update_repeat_request client_id, counter, total
269
- Stella.li3 " Client-%s REPEAT %d of %d" % [client_id.shorter, counter, total]
269
+ Stella.li2 " Client-%s REPEAT %d of %d" % [client_id.shorter, counter, total]
270
270
  end
271
271
 
272
272
  def self.rescue(client_id, &blk)
@@ -6,7 +6,7 @@ module Stella
6
6
  MAJOR = 0.freeze
7
7
  MINOR = 7.freeze
8
8
  TINY = 2.freeze
9
- PATCH = '002'.freeze
9
+ PATCH = '003'.freeze
10
10
  end
11
11
  def self.to_s; [MAJOR, MINOR, TINY].join('.'); end
12
12
  def self.to_f; self.to_s.to_f; 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.2.002"
4
+ s.version = "0.7.2.003"
5
5
  s.summary = "Blame Stella for breaking your web applications."
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
@@ -15,7 +15,7 @@
15
15
 
16
16
  s.executables = %w[stella]
17
17
 
18
- s.add_dependency 'benelux', '>= 0.5.0'
18
+ s.add_dependency 'benelux', '>= 0.5.1'
19
19
  s.add_dependency 'drydock', '>= 0.6.8'
20
20
  s.add_dependency 'gibbler', '>= 0.7.1'
21
21
  s.add_dependency 'sysinfo', '>= 0.7.0'
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.2.002
4
+ version: 0.7.2.003
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.5.0
23
+ version: 0.5.1
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: drydock