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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7b898f9431f2e00f2635eb1c4defb390f458faa1b5cce000834a1b5b338501e
4
- data.tar.gz: 7f145d3680f1454aa57d328d9a9af5c8f5d342ec24c41d2494f2486fb6fb2119
3
+ metadata.gz: 27ea6caaddb5d06fa3e0ed12357c6d39d5ac60cc47c0b30983709a5c8cff3db9
4
+ data.tar.gz: bfca34e7f314b96dc953bebd6c0094ec9672d825e5623087947a0b3b2d03e66e
5
5
  SHA512:
6
- metadata.gz: 3dbe27cd285207090193134aec7e7fcd94fef8263742dee41ec53c61ab8dd65998b6339ee02ae6c4e51bf03533350397076b44c41802f2986aea6874f767cd35
7
- data.tar.gz: c85924364c69f467af407752313f22a6fd2eeb56b18df2ac3450e9c2b10758dc7cc1bb3a8f8fb30579769799451d9bfa75c09ba82c204b4250306f25c30c2b0d
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}..."
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Benchmark
22
22
  module HTTP
23
- VERSION = "0.14.1"
23
+ VERSION = "0.15.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.14.1
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-06-27 00:00:00.000000000 Z
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.1.6
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.