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 +4 -4
- data/.travis.yml +0 -6
- data/benchmark-http.gemspec +4 -2
- data/lib/benchmark/http/command/concurrency.rb +1 -1
- data/lib/benchmark/http/command/spider.rb +4 -8
- data/lib/benchmark/http/version.rb +1 -1
- metadata +11 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91583a8d78b4215f77dc12d1475ff8bbcd1665b01069ed909e206167a37a3988
|
4
|
+
data.tar.gz: 97528282190b4293619e4540bcf8ca32678d4079d649d08cbb1bc3284b80399c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 695e6179adc424baea5eef56b5692c44fa814d6377626b1cab40e1de643fe0ce359dbc0288c3c797a2d253211bb700107fa57449915e48c38a57812a51fe309c
|
7
|
+
data.tar.gz: 0b40ecc5fbd9c08ea8b6a8a433527c4c9ae1d245407953949d06d83478092814f55ee3e77df44f10733eac3baf1a6afaaf21c31701d4432ded2b9cad6b8d0b9b
|
data/.travis.yml
CHANGED
@@ -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
|
data/benchmark-http.gemspec
CHANGED
@@ -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.
|
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"
|
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
|
@@ -89,9 +89,7 @@ module Benchmark
|
|
89
89
|
|
90
90
|
request_uri = url.request_uri
|
91
91
|
|
92
|
-
response =
|
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 =
|
116
|
-
|
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
|
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.
|
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:
|
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.
|
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.
|
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: '
|
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: '
|
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: '
|
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
|
-
|
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.
|