stella 0.7.0.006 → 0.7.0.012

Sign up to get free protection for your applications and to get access to all the features.
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.006
4
+ version: 0.7.0.012
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-09-21 00:00:00 -04:00
12
+ date: 2009-10-02 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: "0"
23
+ version: 0.3.2
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: drydock
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 0.6.2
43
+ version: 0.6.3
44
44
  version:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: storable
@@ -88,6 +88,7 @@ files:
88
88
  - README.rdoc
89
89
  - Rakefile
90
90
  - bin/stella
91
+ - examples/cookies/plan.rb
91
92
  - examples/essentials/logo.png
92
93
  - examples/essentials/plan.rb
93
94
  - examples/essentials/search_terms.csv
@@ -97,6 +98,8 @@ files:
97
98
  - lib/stella.rb
98
99
  - lib/stella/cli.rb
99
100
  - lib/stella/client.rb
101
+ - lib/stella/client/container.rb
102
+ - lib/stella/client/modifiers.rb
100
103
  - lib/stella/config.rb
101
104
  - lib/stella/data.rb
102
105
  - lib/stella/data/http.rb
@@ -109,6 +112,7 @@ files:
109
112
  - lib/stella/exceptions.rb
110
113
  - lib/stella/guidelines.rb
111
114
  - lib/stella/mixins.rb
115
+ - lib/stella/mixins/thread.rb
112
116
  - lib/stella/stats.rb
113
117
  - lib/stella/testplan.rb
114
118
  - lib/stella/testplan/stats.rb
@@ -128,7 +132,6 @@ files:
128
132
  - vendor/httpclient-2.1.5.2/httpclient/http.rb
129
133
  - vendor/httpclient-2.1.5.2/httpclient/session.rb
130
134
  - vendor/httpclient-2.1.5.2/httpclient/ssl_config.rb
131
- - vendor/httpclient-2.1.5.2/httpclient/stats.rb
132
135
  - vendor/httpclient-2.1.5.2/httpclient/timeout.rb
133
136
  - vendor/httpclient-2.1.5.2/httpclient/util.rb
134
137
  has_rdoc: true
@@ -1,90 +0,0 @@
1
-
2
- class HTTPClient
3
-
4
- # Based on Mongrel::Stats, Copyright (c) 2005 Zed A. Shaw
5
- class Stats
6
-
7
- attr_reader :sum, :sumsq, :n, :min, :max
8
-
9
- def initialize
10
- reset
11
- end
12
-
13
- def +(obj)
14
- puts obj.class
15
- end
16
-
17
- # Resets the internal counters so you can start sampling again.
18
- def reset
19
- @n, @sum, @sumsq = 0.0, 0.0, 0.0
20
- @last_time = Time.new
21
- @min, @max = 0.0, 0.0
22
- end
23
-
24
- # Adds a sampling to the calculations.
25
- def sample(s)
26
- @sum += s
27
- @sumsq += s * s
28
- if @n == 0
29
- @min = @max = s
30
- else
31
- @min = s if @min > s
32
- @max = s if @max < s
33
- end
34
- @n+=1
35
- end
36
-
37
- # Dump this Stats object with an optional additional message.
38
- def dump(msg = "", out=STDERR)
39
- out.puts "#{msg}: #{self.to_s}"
40
- end
41
-
42
- # Returns a common display (used by dump)
43
- def to_s
44
- "[#{@name}]: SUM=%0.4f, SUMSQ=%0.4f, N=%0.4f, MEAN=%0.4f, SD=%0.4f, MIN=%0.4f, MAX=%0.4f" % [@sum, @sumsq, @n, mean, sd, @min, @max]
45
- end
46
-
47
-
48
- # Calculates and returns the mean for the data passed so far.
49
- def mean
50
- @sum / @n
51
- end
52
-
53
- # Calculates the standard deviation of the data so far.
54
- def sd
55
- return 0.0 if @n <= 1
56
- # (sqrt( ((s).sumsq - ( (s).sum * (s).sum / (s).n)) / ((s).n-1) ))
57
- begin
58
- return Math.sqrt( (@sumsq - ( @sum * @sum / @n)) / (@n-1) )
59
- rescue Errno::EDOM
60
- return 0.0
61
- end
62
- end
63
-
64
-
65
- # Adds a time delta between now and the last time you called this. This
66
- # will give you the average time between two activities.
67
- #
68
- # An example is:
69
- #
70
- # t = Stats.new("do_stuff")
71
- # 10000.times { do_stuff(); t.tick }
72
- # t.dump("time")
73
- #
74
- def tick
75
- now = Time.now
76
- sample(now - @last_time)
77
- @last_time = now
78
- end
79
- end
80
-
81
- class Timer
82
- attr_reader :initialized
83
- attr_reader :stats
84
- def initialized
85
- @initialized = Time.now
86
- @stats = Stats.new
87
- end
88
- end
89
- end
90
-