benchmark-http 0.14.1 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/benchmark/http/command/hammer.rb +6 -1
- data/lib/benchmark/http/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27ea6caaddb5d06fa3e0ed12357c6d39d5ac60cc47c0b30983709a5c8cff3db9
|
4
|
+
data.tar.gz: bfca34e7f314b96dc953bebd6c0094ec9672d825e5623087947a0b3b2d03e66e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c837530151c68de4a2b4b9927a5df019472b93e1d544860d8862c0d683845e7bdc7b5d040e06ee90641fd25fbcfee48b113f711b7c98a061ada66c499806e973
|
7
|
+
data.tar.gz: 672d38bf11d11426d93d82ad96b94c63bb9eb108530185ecce219d89e47e7462b07db2f6686ae41680a362baba7804cf6b6ee648b50140140838b924920cc1b5
|
@@ -38,6 +38,7 @@ module Benchmark
|
|
38
38
|
option '-c/--count <integer>', "The number of requests to make per connection.", default: 10_000, type: Integer
|
39
39
|
|
40
40
|
option '-i/--interval <integer>', "The time to wait between measurements.", default: nil, type: Integer
|
41
|
+
option '--alpn-protocols <name,name>', "Force specific ALPN protocols during connection negotiation.", default: nil, type: String
|
41
42
|
end
|
42
43
|
|
43
44
|
many :urls, "The urls to hammer."
|
@@ -82,8 +83,12 @@ module Benchmark
|
|
82
83
|
return statistics
|
83
84
|
end
|
84
85
|
|
86
|
+
def alpn_protocols
|
87
|
+
@options[:alpn_protocols]&.split(',')
|
88
|
+
end
|
89
|
+
|
85
90
|
def run(url)
|
86
|
-
endpoint = Async::HTTP::Endpoint.parse(url)
|
91
|
+
endpoint = Async::HTTP::Endpoint.parse(url, alpn_protocols: self.alpn_protocols)
|
87
92
|
request_path = endpoint.url.request_uri
|
88
93
|
|
89
94
|
puts "I am going to benchmark #{url}..."
|
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.15.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: 2021-
|
11
|
+
date: 2021-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-await
|
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
- !ruby/object:Gem::Version
|
189
189
|
version: '0'
|
190
190
|
requirements: []
|
191
|
-
rubygems_version: 3.
|
191
|
+
rubygems_version: 3.2.22
|
192
192
|
signing_key:
|
193
193
|
specification_version: 4
|
194
194
|
summary: An asynchronous benchmark toolbox for modern HTTP servers.
|