httperfrb 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +5 -0
- data/lib/httperf/parser.rb +9 -6
- data/lib/httperf/version.rb +1 -1
- metadata +10 -10
data/HISTORY.md
CHANGED
data/lib/httperf/parser.rb
CHANGED
@@ -58,7 +58,7 @@ class HTTPerf
|
|
58
58
|
protected
|
59
59
|
|
60
60
|
def self.verbose_expression
|
61
|
-
/^Connection lifetime = ([0-9]
|
61
|
+
/^Connection lifetime = ([0-9]+\.[0-9]+)(\s?)/
|
62
62
|
end
|
63
63
|
|
64
64
|
def self.expressions
|
@@ -152,13 +152,16 @@ class HTTPerf
|
|
152
152
|
|
153
153
|
private
|
154
154
|
def self.calculate_percentile percentile, values
|
155
|
-
|
156
|
-
|
155
|
+
case values.count
|
156
|
+
when 1
|
157
|
+
values.first
|
158
|
+
when 2
|
159
|
+
values.last
|
160
|
+
else
|
161
|
+
values.sort[((values.count.to_f/100)*percentile.to_f).round(0)-1]
|
162
|
+
end
|
157
163
|
end
|
158
164
|
|
159
|
-
def self.percentile_index percentile, count
|
160
|
-
((count/100)*percentile)-1
|
161
|
-
end
|
162
165
|
end
|
163
166
|
end
|
164
167
|
|
data/lib/httperf/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httperfrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-08-14 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &20419100 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *20419100
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: simplecov
|
27
|
-
requirement: &
|
27
|
+
requirement: &20418540 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *20418540
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: yard
|
38
|
-
requirement: &
|
38
|
+
requirement: &20418080 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *20418080
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: open4
|
49
|
-
requirement: &
|
49
|
+
requirement: &20417560 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *20417560
|
58
58
|
description: Simple interface for calling httperf via ruby.
|
59
59
|
email:
|
60
60
|
- joshua@mervine.net
|
@@ -82,7 +82,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
segments:
|
84
84
|
- 0
|
85
|
-
hash:
|
85
|
+
hash: 3635307491401586106
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
none: false
|
88
88
|
requirements:
|