benchmark-http 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3124c3387e3aab4ccbf65df957dfa9bae664cfc703690764a14c7c3a5f4342db
4
- data.tar.gz: f561e9afe0867445b336da264b0f9630441e1610b9b6c695595f22b839acd834
3
+ metadata.gz: 91583a8d78b4215f77dc12d1475ff8bbcd1665b01069ed909e206167a37a3988
4
+ data.tar.gz: 97528282190b4293619e4540bcf8ca32678d4079d649d08cbb1bc3284b80399c
5
5
  SHA512:
6
- metadata.gz: 4d9eaaf78e6c0a11970ed8b73a71f966d2004996e5b479b61a4d1657c49a67b09b16f4dcf499e0dfabae2307dcf18f4f8f4ed0aa8120b632e31b213a8f375d2f
7
- data.tar.gz: 4c42fbbd65dd6a79e0228085630fa5951fc00246d605d4d24f95e3b7546a31b5d5e1934b37664c4dcec22c4f58e57761675ae51b65154726833b77d09b2f38c3
6
+ metadata.gz: 695e6179adc424baea5eef56b5692c44fa814d6377626b1cab40e1de643fe0ce359dbc0288c3c797a2d253211bb700107fa57449915e48c38a57812a51fe309c
7
+ data.tar.gz: 0b40ecc5fbd9c08ea8b6a8a433527c4c9ae1d245407953949d06d83478092814f55ee3e77df44f10733eac3baf1a6afaaf21c31701d4432ded2b9cad6b8d0b9b
@@ -1,11 +1,7 @@
1
1
  language: ruby
2
- sudo: required
3
2
  dist: xenial
4
3
  cache: bundler
5
4
 
6
- before_script:
7
- - gem update --system
8
-
9
5
  matrix:
10
6
  include:
11
7
  - rvm: 2.4
@@ -14,8 +10,6 @@ matrix:
14
10
  - rvm: jruby-head
15
11
  env: JRUBY_OPTS="--debug -X+O"
16
12
  - rvm: ruby-head
17
- - rvm: rbx-3
18
13
  allow_failures:
19
14
  - rvm: ruby-head
20
15
  - rvm: jruby-head
21
- - rvm: rbx-3
@@ -15,15 +15,17 @@ Gem::Specification.new do |spec|
15
15
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
16
  spec.require_paths = ["lib"]
17
17
 
18
+ spec.required_ruby_version = '~> 2.4'
19
+
18
20
  spec.add_dependency("async-io", "~> 1.5")
19
- spec.add_dependency("async-http", "~> 0.37.4")
21
+ spec.add_dependency("async-http", "~> 0.37.13")
20
22
  spec.add_dependency("async-await")
21
23
 
22
24
  spec.add_dependency("trenni-sanitize")
23
25
 
24
26
  spec.add_dependency('samovar', "~> 1.3")
25
27
 
26
- spec.add_development_dependency "bundler", "~> 1.16"
28
+ spec.add_development_dependency "bundler"
27
29
  spec.add_development_dependency "rake", "~> 10.0"
28
30
  spec.add_development_dependency "rspec", "~> 3.0"
29
31
  end
@@ -55,7 +55,7 @@ module Benchmark
55
55
  client = Async::HTTP::Client.new(endpoint, endpoint.protocol)
56
56
 
57
57
  statistics.sample(confidence_factor) do
58
- response = client.get(request_path)
58
+ response = client.get(request_path).tap(&:finish)
59
59
  end
60
60
 
61
61
  client.close
@@ -89,9 +89,7 @@ module Benchmark
89
89
 
90
90
  request_uri = url.request_uri
91
91
 
92
- response = timeout(10) do
93
- client.head(request_uri).tap(&:read)
94
- end
92
+ response = client.head(request_uri).tap(&:read)
95
93
 
96
94
  log("HEAD", url, response)
97
95
 
@@ -112,10 +110,8 @@ module Benchmark
112
110
  return
113
111
  end
114
112
 
115
- response = timeout(20) do
116
- statistics.measure do
117
- client.get(request_uri)
118
- end
113
+ response = statistics.measure do
114
+ client.get(request_uri)
119
115
  end
120
116
 
121
117
  log("GET", url, response)
@@ -133,7 +129,7 @@ module Benchmark
133
129
  statistics = Statistics.new
134
130
 
135
131
  @urls.each do |url|
136
- endpoint = Async::HTTP::URLEndpoint.parse(url)
132
+ endpoint = Async::HTTP::URLEndpoint.parse(url, timeout: 10)
137
133
 
138
134
  Async::HTTP::Client.open(endpoint, endpoint.protocol, connection_limit: 4) do |client|
139
135
  fetch(statistics, client, endpoint.url).wait
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Benchmark
22
22
  module HTTP
23
- VERSION = "0.5.0"
23
+ VERSION = "0.6.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benchmark-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-28 00:00:00.000000000 Z
11
+ date: 2019-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-io
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.37.4
33
+ version: 0.37.13
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.37.4
40
+ version: 0.37.13
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: async-await
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '1.16'
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '1.16'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -156,17 +156,16 @@ require_paths:
156
156
  - lib
157
157
  required_ruby_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
- - - ">="
159
+ - - "~>"
160
160
  - !ruby/object:Gem::Version
161
- version: '0'
161
+ version: '2.4'
162
162
  required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  requirements: []
168
- rubyforge_project:
169
- rubygems_version: 2.7.7
168
+ rubygems_version: 3.0.1
170
169
  signing_key:
171
170
  specification_version: 4
172
171
  summary: An asynchronous benchmark toolbox for modern HTTP servers.