bombard 0.0.6 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bombard/version.rb +1 -1
- data/lib/siege/results.rb +14 -14
- metadata +3 -3
data/lib/bombard/version.rb
CHANGED
data/lib/siege/results.rb
CHANGED
@@ -29,18 +29,18 @@ class Siege
|
|
29
29
|
alias_method :response, :response_time
|
30
30
|
|
31
31
|
def initialize(results)
|
32
|
-
@transactions = Integer parse(:transactions)
|
33
|
-
@availability = Float parse(:availability)
|
34
|
-
@elapsed_time = Float parse(:elapsed_time)
|
35
|
-
@data_transferred = Float parse(:data_transferred)
|
36
|
-
@response_time = Float parse(:response_time)
|
37
|
-
@transaction_rate = Float parse(:transaction_rate)
|
38
|
-
@throughput = Float parse(:throughput)
|
39
|
-
@concurrency = Float parse(:concurrency)
|
40
|
-
@failed_requests = Integer parse(:failed_requests)
|
41
|
-
@longest_request = Float parse(:longest_request)
|
42
|
-
@shortest_request = Float parse(:shortest_request)
|
43
32
|
@results = results
|
33
|
+
@transactions = Integer parse(:TRANSACTIONS)
|
34
|
+
@availability = Float parse(:AVAILABILITY)
|
35
|
+
@elapsed_time = Float parse(:ELAPSED_TIME)
|
36
|
+
@data_transferred = Float parse(:DATA_TRANSFERRED)
|
37
|
+
@response_time = Float parse(:RESPONSE_TIME)
|
38
|
+
@transaction_rate = Float parse(:TRANSACTION_RATE)
|
39
|
+
@throughput = Float parse(:THROUGHPUT)
|
40
|
+
@concurrency = Float parse(:CONCURRENCY)
|
41
|
+
@failed_requests = Integer parse(:FAILED_REQUESTS)
|
42
|
+
@longest_request = Float parse(:LONGEST_REQUEST)
|
43
|
+
@shortest_request = Float parse(:SHORTEST_REQUEST)
|
44
44
|
rescue ArgumentError => e
|
45
45
|
(e.message.include?('invalid value')) ? dump_results : raise(e)
|
46
46
|
end
|
@@ -50,7 +50,7 @@ class Siege
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def to_s
|
53
|
-
@results
|
53
|
+
@to_s ||= @results
|
54
54
|
end
|
55
55
|
|
56
56
|
def to_h
|
@@ -70,12 +70,12 @@ class Siege
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def parse(const)
|
73
|
-
dump_results unless match =
|
73
|
+
dump_results unless match = self.class.const_get(const).match(to_s)
|
74
74
|
match[1]
|
75
75
|
end
|
76
76
|
|
77
77
|
def dump_results
|
78
|
-
abort "A Siege error occurred:\n
|
78
|
+
abort "A Siege error occurred:\n#{to_s}"
|
79
79
|
end
|
80
80
|
end
|
81
81
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bombard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -172,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
172
|
version: '0'
|
173
173
|
segments:
|
174
174
|
- 0
|
175
|
-
hash:
|
175
|
+
hash: 4142457187188330860
|
176
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
177
|
none: false
|
178
178
|
requirements:
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
segments:
|
183
183
|
- 0
|
184
|
-
hash:
|
184
|
+
hash: 4142457187188330860
|
185
185
|
requirements: []
|
186
186
|
rubyforge_project:
|
187
187
|
rubygems_version: 1.8.23
|