benchmark-http 0.13.0 → 0.14.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: 13d218f8460468f4e36bfee9339ce124a4a850681c8fb5f007290cfadec71440
4
- data.tar.gz: 67f837ffda547018fd5a15bb21e31fa5fb70c2b0506fa5ae0628bbfe7af65e1a
3
+ metadata.gz: 176591c857ec1ed5343a1cce9e22d8022be65d51591f247abfd34d13fdd266d4
4
+ data.tar.gz: dc1055ab4d508de153411bec29ef669a1b80cbce749bac330aeb26159398c60b
5
5
  SHA512:
6
- metadata.gz: 93f1d330ac3e0eb517deb422a41dc31796b2018949e91a7c1a694c53710d895ffb9af23ac95f41523c03cb0dcda243fd59d3781e4545243c1f0ce3eb4019ab98
7
- data.tar.gz: c88bb8bdd60d1a281381f24b30e84a09fc63aa5642a58a1c878dc35df33d7bdcc04c0bf2979fec219a14a10ea0eb40ad59153ac21d7ebbda56ac0b7b26d91daf
6
+ metadata.gz: 8495e20359f05748e5595ec5a60f87a650425063619ec89b745cc2c144c8f2e876255560e24e8000d532a30c7cfb54b63e1297a2e951abb6152e61a16d6336ec
7
+ data.tar.gz: 1fd0150f5620ef96a2ac2e3742eda808760a86f93a61da98aefeb241012d154d292a388cea0aa16b545060f860757c52ee77226a6107488727e8008c839fc712
@@ -36,6 +36,8 @@ module Benchmark
36
36
  options do
37
37
  option "-k/--concurrency <count>", "The number of simultaneous connections to make.", default: 1, type: Integer
38
38
  option '-c/--count <integer>', "The number of requests to make per connection.", default: 10_000, type: Integer
39
+
40
+ option '-i/--interval <integer>', "The time to wait between measurements.", default: nil, type: Integer
39
41
  end
40
42
 
41
43
  many :urls, "The urls to hammer."
@@ -56,7 +58,7 @@ module Benchmark
56
58
 
57
59
  concurrency.times.map do
58
60
  task.async do
59
- client = Async::HTTP::Client.new(endpoint, endpoint.protocol)
61
+ client = Async::HTTP::Client.new(endpoint, protocol: endpoint.protocol)
60
62
 
61
63
  count.times do |i|
62
64
  statistics.measure do
@@ -86,7 +88,7 @@ module Benchmark
86
88
 
87
89
  puts "I am going to benchmark #{url}..."
88
90
 
89
- Async::Reactor.run do |task|
91
+ Async do |task|
90
92
  statistics = []
91
93
 
92
94
  base = measure_performance(@options[:concurrency], @options[:count], endpoint, request_path)
@@ -94,8 +96,16 @@ module Benchmark
94
96
  end
95
97
 
96
98
  def call
97
- @urls.each do |url|
98
- run(url).wait
99
+ while true
100
+ @urls.each do |url|
101
+ run(url).wait
102
+ end
103
+
104
+ if @interval
105
+ sleep(@interval)
106
+ else
107
+ break
108
+ end
99
109
  end
100
110
  end
101
111
  end
@@ -114,7 +114,7 @@ module Benchmark
114
114
  yield("GET", url, response) if block_given?
115
115
 
116
116
  extract_links(url, response) do |href|
117
- fetch(statistics, client, href, depth - 1, fetched, &block)
117
+ fetch(statistics, client, href, depth&.-(1), fetched, &block)
118
118
  end.each(&:wait)
119
119
  rescue Async::TimeoutError
120
120
  Async.logger.error(self) {"Timeout while fetching #{url}"}
@@ -128,7 +128,7 @@ module Benchmark
128
128
  urls.each do |url|
129
129
  endpoint = Async::HTTP::Endpoint.parse(url, timeout: 10)
130
130
 
131
- Async::HTTP::Client.open(endpoint, endpoint.protocol, connection_limit: 4) do |client|
131
+ Async::HTTP::Client.open(endpoint, protocol: endpoint.protocol, connection_limit: 4) do |client|
132
132
  fetch(statistics, client, endpoint.url, &block).wait
133
133
  end
134
134
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Benchmark
22
22
  module HTTP
23
- VERSION = "0.13.0"
23
+ VERSION = "0.14.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,87 +1,87 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benchmark-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-14 00:00:00.000000000 Z
11
+ date: 2021-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: async-io
14
+ name: async-await
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.5'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.5'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: async-http
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.45'
33
+ version: '0.54'
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.45'
40
+ version: '0.54'
41
41
  - !ruby/object:Gem::Dependency
42
- name: async-await
42
+ name: async-io
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '1.5'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '1.5'
55
55
  - !ruby/object:Gem::Dependency
56
- name: trenni-sanitize
56
+ name: samovar
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '2.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '2.0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: samovar
70
+ name: trenni-sanitize
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '2.0'
75
+ version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '2.0'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: covered
84
+ name: async-rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: async-rspec
98
+ name: bundler
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: bundler
112
+ name: covered
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -150,22 +150,13 @@ dependencies:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '3.0'
153
- description:
153
+ description:
154
154
  email:
155
- - samuel.williams@oriontransfer.co.nz
156
155
  executables:
157
156
  - benchmark-http
158
157
  extensions: []
159
158
  extra_rdoc_files: []
160
159
  files:
161
- - ".editorconfig"
162
- - ".gitignore"
163
- - ".rspec"
164
- - ".travis.yml"
165
- - Gemfile
166
- - README.md
167
- - Rakefile
168
- - benchmark-http.gemspec
169
160
  - bin/benchmark-http
170
161
  - lib/benchmark/http.rb
171
162
  - lib/benchmark/http/command.rb
@@ -179,15 +170,16 @@ files:
179
170
  - lib/benchmark/http/statistics.rb
180
171
  - lib/benchmark/http/version.rb
181
172
  homepage: https://github.com/socketry/benchmark-http
182
- licenses: []
173
+ licenses:
174
+ - MIT
183
175
  metadata: {}
184
- post_install_message:
176
+ post_install_message:
185
177
  rdoc_options: []
186
178
  require_paths:
187
179
  - lib
188
180
  required_ruby_version: !ruby/object:Gem::Requirement
189
181
  requirements:
190
- - - "~>"
182
+ - - ">="
191
183
  - !ruby/object:Gem::Version
192
184
  version: '2.4'
193
185
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -196,8 +188,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
188
  - !ruby/object:Gem::Version
197
189
  version: '0'
198
190
  requirements: []
199
- rubygems_version: 3.1.2
200
- signing_key:
191
+ rubygems_version: 3.2.3
192
+ signing_key:
201
193
  specification_version: 4
202
194
  summary: An asynchronous benchmark toolbox for modern HTTP servers.
203
195
  test_files: []
@@ -1,6 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = tab
5
- indent_size = 2
6
-
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
12
-
13
- Gemfile.lock
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
@@ -1,16 +0,0 @@
1
- language: ruby
2
- dist: xenial
3
- cache: bundler
4
-
5
- matrix:
6
- include:
7
- - rvm: 2.4
8
- - rvm: 2.5
9
- - rvm: 2.6
10
- - rvm: 2.7
11
- - rvm: jruby-head
12
- env: JRUBY_OPTS="--debug -X+O"
13
- - rvm: ruby-head
14
- allow_failures:
15
- - rvm: ruby-head
16
- - rvm: jruby-head
data/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- group :development do
6
- gem 'pry'
7
- end
data/README.md DELETED
@@ -1,223 +0,0 @@
1
- # Benchmark::HTTP
2
-
3
- An asynchronous HTTP benchmark tool built on top of [async], [async-io] and [async-http]. Useful for analysing server performance. Supports HTTP1 and HTTP2.
4
-
5
- [![Build Status](https://secure.travis-ci.org/socketry/benchmark-http.svg)](http://travis-ci.org/socketry/benchmark-http)
6
- [![Code Climate](https://codeclimate.com/github/socketry/benchmark-http.svg)](https://codeclimate.com/github/socketry/benchmark-http)
7
- [![Coverage Status](https://coveralls.io/repos/socketry/benchmark-http/badge.svg)](https://coveralls.io/r/socketry/benchmark-http)
8
-
9
- [async]: https://github.com/socketry/async
10
- [async-io]: https://github.com/socketry/async-io
11
- [async-http]: https://github.com/socketry/async-http
12
-
13
- ## Installation
14
-
15
- Install it yourself:
16
-
17
- $ gem install benchmark-http
18
-
19
- ## Usage
20
-
21
- You can run `benchmark-http` is a top level tool for invoking specific benchmarks.
22
-
23
- ### Spider
24
-
25
- This benchmark spiders a website and generates some statistics on general access time.
26
-
27
- ```shell
28
- $ benchmark-http spider https://www.oriontransfer.co.nz/welcome/index
29
- HEAD https://www.oriontransfer.co.nz/welcome/index -> HTTP/2.0 404 (unspecified bytes)
30
- GET https://www.oriontransfer.co.nz/welcome/index (depth = 10)
31
- GET https://www.oriontransfer.co.nz/welcome/index -> HTTP/2.0 404 (2263 bytes)
32
- HEAD https://www.oriontransfer.co.nz/products/index -> HTTP/2.0 200 (unspecified bytes)
33
- GET https://www.oriontransfer.co.nz/products/index (depth = 9)
34
- HEAD https://www.oriontransfer.co.nz/services/index -> HTTP/2.0 200 (unspecified bytes)
35
- GET https://www.oriontransfer.co.nz/services/index (depth = 9)
36
- HEAD https://www.oriontransfer.co.nz/support/index -> HTTP/2.0 200 (unspecified bytes)
37
- GET https://www.oriontransfer.co.nz/support/index (depth = 9)
38
- HEAD https://www.oriontransfer.co.nz/support/contact-us -> HTTP/2.0 307 (unspecified bytes)
39
- Following redirect to https://www.oriontransfer.co.nz/support/contact-us/index...
40
- HEAD https://www.oriontransfer.co.nz/support/terms-of-service -> HTTP/2.0 200 (unspecified bytes)
41
- GET https://www.oriontransfer.co.nz/support/terms-of-service (depth = 9)
42
- GET https://www.oriontransfer.co.nz/products/index -> HTTP/2.0 200 (3469 bytes)
43
- GET https://www.oriontransfer.co.nz/services/index -> HTTP/2.0 200 (2488 bytes)
44
- GET https://www.oriontransfer.co.nz/support/index -> HTTP/2.0 200 (2246 bytes)
45
- HEAD https://www.oriontransfer.co.nz/support/contact-us/index -> HTTP/2.0 200 (unspecified bytes)
46
- GET https://www.oriontransfer.co.nz/support/contact-us/index (depth = 8)
47
- GET https://www.oriontransfer.co.nz/support/terms-of-service -> HTTP/2.0 200 (8466 bytes)
48
- HEAD https://www.oriontransfer.co.nz/products/library-inspector/index -> HTTP/2.0 200 (unspecified bytes)
49
- GET https://www.oriontransfer.co.nz/products/library-inspector/index (depth = 8)
50
- HEAD https://www.oriontransfer.co.nz/products/truth-tables/index -> HTTP/2.0 200 (unspecified bytes)
51
- GET https://www.oriontransfer.co.nz/products/truth-tables/index (depth = 8)
52
- HEAD https://www.oriontransfer.co.nz/products/fingerprint/index -> HTTP/2.0 200 (unspecified bytes)
53
- GET https://www.oriontransfer.co.nz/products/fingerprint/index (depth = 8)
54
- HEAD https://www.oriontransfer.co.nz/services/internet-services -> HTTP/2.0 200 (unspecified bytes)
55
- GET https://www.oriontransfer.co.nz/services/internet-services (depth = 8)
56
- HEAD https://www.oriontransfer.co.nz/services/software-development -> HTTP/2.0 200 (unspecified bytes)
57
- GET https://www.oriontransfer.co.nz/services/software-development (depth = 8)
58
- HEAD https://www.oriontransfer.co.nz/services/systems-administration -> HTTP/2.0 200 (unspecified bytes)
59
- GET https://www.oriontransfer.co.nz/services/systems-administration (depth = 8)
60
- HEAD https://www.oriontransfer.co.nz/services/website-development -> HTTP/2.0 200 (unspecified bytes)
61
- GET https://www.oriontransfer.co.nz/services/website-development (depth = 8)
62
- HEAD https://www.oriontransfer.co.nz/support/contact-us/ -> HTTP/2.0 307 (unspecified bytes)
63
- Following redirect to https://www.oriontransfer.co.nz/support/contact-us/index...
64
- GET https://www.oriontransfer.co.nz/support/contact-us/index -> HTTP/2.0 200 (3094 bytes)
65
- GET https://www.oriontransfer.co.nz/products/library-inspector/index -> HTTP/2.0 200 (5592 bytes)
66
- GET https://www.oriontransfer.co.nz/products/truth-tables/index -> HTTP/2.0 200 (4160 bytes)
67
- GET https://www.oriontransfer.co.nz/products/fingerprint/index -> HTTP/2.0 200 (4414 bytes)
68
- GET https://www.oriontransfer.co.nz/services/internet-services -> HTTP/2.0 200 (3362 bytes)
69
- GET https://www.oriontransfer.co.nz/services/software-development -> HTTP/2.0 200 (3521 bytes)
70
- GET https://www.oriontransfer.co.nz/services/systems-administration -> HTTP/2.0 200 (2979 bytes)
71
- GET https://www.oriontransfer.co.nz/services/website-development -> HTTP/2.0 200 (3943 bytes)
72
- HEAD https://www.oriontransfer.co.nz/_gallery/products/library-inspector/_screenshots/large/Library%20Inspector%20(Libraries).png -> HTTP/2.0 200 (unspecified bytes)
73
- Unsupported content type: image/png
74
- HEAD https://www.oriontransfer.co.nz/_gallery/products/library-inspector/_screenshots/large/Library%20Inspector%20(Libraries%20Disassembly).png -> HTTP/2.0 200 (unspecified bytes)
75
- Unsupported content type: image/png
76
- HEAD https://www.oriontransfer.co.nz/_gallery/products/library-inspector/_screenshots/large/Library%20Inspector%20(Libraries%20QuickLook).png -> HTTP/2.0 200 (unspecified bytes)
77
- Unsupported content type: image/png
78
- HEAD https://www.oriontransfer.co.nz/_gallery/products/library-inspector/_screenshots/large/Library%20Inspector%20(App).png -> HTTP/2.0 200 (unspecified bytes)
79
- Unsupported content type: image/png
80
- HEAD https://www.oriontransfer.co.nz/_gallery/products/library-inspector/_screenshots/large/Library%20Inspector%20(App%20Headers).png -> HTTP/2.0 200 (unspecified bytes)
81
- Unsupported content type: image/png
82
- HEAD https://www.oriontransfer.co.nz/_gallery/products/truth-tables/_screenshots/large/Reformat%20Expression.png -> HTTP/2.0 200 (unspecified bytes)
83
- Unsupported content type: image/png
84
- HEAD https://www.oriontransfer.co.nz/_gallery/products/truth-tables/_screenshots/large/Large%20Tables.png -> HTTP/2.0 200 (unspecified bytes)
85
- Unsupported content type: image/png
86
- HEAD https://www.oriontransfer.co.nz/_gallery/products/truth-tables/_screenshots/large/Tutor.png -> HTTP/2.0 200 (unspecified bytes)
87
- Unsupported content type: image/png
88
- HEAD https://www.oriontransfer.co.nz/_gallery/products/truth-tables/_screenshots/large/Informative%20Text.png -> HTTP/2.0 200 (unspecified bytes)
89
- Unsupported content type: image/png
90
- HEAD https://www.oriontransfer.co.nz/_gallery/products/fingerprint/_screenshots/large/Fingerprint%20(3).png -> HTTP/2.0 200 (unspecified bytes)
91
- Unsupported content type: image/png
92
- HEAD https://www.oriontransfer.co.nz/_gallery/products/fingerprint/_screenshots/large/Fingerprint%20(2).png -> HTTP/2.0 200 (unspecified bytes)
93
- Unsupported content type: image/png
94
- HEAD https://www.oriontransfer.co.nz/_gallery/products/fingerprint/_screenshots/large/Fingerprint%20(1).png -> HTTP/2.0 200 (unspecified bytes)
95
- Unsupported content type: image/png
96
- HEAD https://www.oriontransfer.co.nz/services/training -> HTTP/2.0 200 (unspecified bytes)
97
- GET https://www.oriontransfer.co.nz/services/training (depth = 7)
98
- GET https://www.oriontransfer.co.nz/services/training -> HTTP/2.0 200 (2994 bytes)
99
- 14 samples: 13x 200; 1x 404. 15.12 requests per second. S/D: 35.69ms.
100
- ```
101
-
102
- ### Concurrency
103
-
104
- This benchmark determines the optimal level of concurrency (maximise throughput while keeping latency to a minimum).
105
-
106
- ```shell
107
- $ benchmark-http concurrency https://www.oriontransfer.co.nz/welcome/index
108
- I am going to benchmark https://www.oriontransfer.co.nz/welcome/index...
109
- I am running 1 asynchronous tasks that will each make sequential requests...
110
- I made 273 requests in 52.4s. The per-request latency was 191.79ms. That's 5.214149911737622 asynchronous requests/second.
111
- Variance: 997.437µs
112
- Standard Deviation: 31.58ms
113
- Standard Error: 0.0019114428646174592
114
- I am running 2 asynchronous tasks that will each make sequential requests...
115
- I made 177 requests in 16.8s. The per-request latency was 190.19ms. That's 10.51600772540387 asynchronous requests/second.
116
- Variance: 632.076µs
117
- Standard Deviation: 25.14ms
118
- Standard Error: 0.001889722381767832
119
- I am running 4 asynchronous tasks that will each make sequential requests...
120
- I made 8 requests in 372.49ms. The per-request latency was 186.25ms. That's 21.476841588829895 asynchronous requests/second.
121
- Variance: 0.048µs
122
- Standard Deviation: 219.819µs
123
- Standard Error: 7.771792696588776e-05
124
- I am running 8 asynchronous tasks that will each make sequential requests...
125
- I made 128 requests in 3.0s. The per-request latency was 188.10ms. That's 42.53004421587869 asynchronous requests/second.
126
- Variance: 399.781µs
127
- Standard Deviation: 19.99ms
128
- Standard Error: 0.0017672840585127617
129
- I am running 16 asynchronous tasks that will each make sequential requests...
130
- I made 184 requests in 2.2s. The per-request latency was 188.46ms. That's 84.89938672881854 asynchronous requests/second.
131
- Variance: 548.641µs
132
- Standard Deviation: 23.42ms
133
- Standard Error: 0.0017267724185582615
134
- I am running 32 asynchronous tasks that will each make sequential requests...
135
- I made 152 requests in 891.06ms. The per-request latency was 187.59ms. That's 170.58399627520865 asynchronous requests/second.
136
- Variance: 335.694µs
137
- Standard Deviation: 18.32ms
138
- Standard Error: 0.00148610620533633
139
- I am running 64 asynchronous tasks that will each make sequential requests...
140
- I made 438 requests in 1.3s. The per-request latency was 191.68ms. That's 333.89790173541496 asynchronous requests/second.
141
- Variance: 1.19ms
142
- Standard Deviation: 34.51ms
143
- Standard Error: 0.001648801656177374
144
- I am running 128 asynchronous tasks that will each make sequential requests...
145
- I made 360 requests in 533.83ms. The per-request latency was 189.81ms. That's 674.373540567776 asynchronous requests/second.
146
- Variance: 555.212µs
147
- Standard Deviation: 23.56ms
148
- Standard Error: 0.0012418759009531876
149
- I am running 256 asynchronous tasks that will each make sequential requests...
150
- I made 512 requests in 463.03ms. The per-request latency was 231.51ms. That's 1105.762787139087 asynchronous requests/second.
151
- Variance: 888.185µs
152
- Standard Deviation: 29.80ms
153
- Standard Error: 0.0013170938569343825
154
- I am running 192 asynchronous tasks that will each make sequential requests...
155
- I made 384 requests in 380.97ms. The per-request latency was 190.48ms. That's 1007.9615261872923 asynchronous requests/second.
156
- Variance: 142.770µs
157
- Standard Deviation: 11.95ms
158
- Standard Error: 0.0006097518459132856
159
- I am running 224 asynchronous tasks that will each make sequential requests...
160
- I made 448 requests in 411.79ms. The per-request latency was 205.89ms. That's 1087.9398101463066 asynchronous requests/second.
161
- Variance: 215.480µs
162
- Standard Deviation: 14.68ms
163
- Standard Error: 0.0006935294886115942
164
- I am running 240 asynchronous tasks that will each make sequential requests...
165
- I made 480 requests in 401.62ms. The per-request latency was 200.81ms. That's 1195.1473779597363 asynchronous requests/second.
166
- Variance: 292.021µs
167
- Standard Deviation: 17.09ms
168
- Standard Error: 0.0007799848849992035
169
- I am running 248 asynchronous tasks that will each make sequential requests...
170
- I made 496 requests in 432.58ms. The per-request latency was 216.29ms. That's 1146.621534849607 asynchronous requests/second.
171
- Variance: 446.681µs
172
- Standard Deviation: 21.13ms
173
- Standard Error: 0.0009489813840514241
174
- I am running 252 asynchronous tasks that will each make sequential requests...
175
- I made 504 requests in 417.86ms. The per-request latency was 208.93ms. That's 1206.1477638702509 asynchronous requests/second.
176
- Variance: 222.939µs
177
- Standard Deviation: 14.93ms
178
- Standard Error: 0.0006650854376052381
179
- I am running 254 asynchronous tasks that will each make sequential requests...
180
- I made 508 requests in 419.67ms. The per-request latency was 209.83ms. That's 1210.4835614086478 asynchronous requests/second.
181
- Variance: 177.005µs
182
- Standard Deviation: 13.30ms
183
- Standard Error: 0.0005902836562252991
184
- I am running 255 asynchronous tasks that will each make sequential requests...
185
- I made 510 requests in 434.38ms. The per-request latency was 217.19ms. That's 1174.0936493567908 asynchronous requests/second.
186
- Variance: 457.592µs
187
- Standard Deviation: 21.39ms
188
- Standard Error: 0.000947227304291054
189
- Your server can handle 255 concurrent requests.
190
- At this level of concurrency, requests have ~1.13x higher latency.
191
- ```
192
-
193
- ## Contributing
194
-
195
- 1. Fork it
196
- 2. Create your feature branch (`git checkout -b my-new-feature`)
197
- 3. Commit your changes (`git commit -am 'Add some feature'`)
198
- 4. Push to the branch (`git push origin my-new-feature`)
199
- 5. Create new Pull Request
200
-
201
- ## License
202
-
203
- Released under the MIT license.
204
-
205
- Copyright, 2018, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
206
-
207
- Permission is hereby granted, free of charge, to any person obtaining a copy
208
- of this software and associated documentation files (the "Software"), to deal
209
- in the Software without restriction, including without limitation the rights
210
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
211
- copies of the Software, and to permit persons to whom the Software is
212
- furnished to do so, subject to the following conditions:
213
-
214
- The above copyright notice and this permission notice shall be included in
215
- all copies or substantial portions of the Software.
216
-
217
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
218
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
219
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
220
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
221
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
222
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
223
- THE SOFTWARE.
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -1,33 +0,0 @@
1
- require_relative "lib/benchmark/http/version"
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = "benchmark-http"
5
- spec.version = Benchmark::HTTP::VERSION
6
- spec.authors = ["Samuel Williams"]
7
- spec.email = ["samuel.williams@oriontransfer.co.nz"]
8
-
9
- spec.summary = "An asynchronous benchmark toolbox for modern HTTP servers."
10
- spec.homepage = "https://github.com/socketry/benchmark-http"
11
-
12
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
13
- f.match(%r{^(test|spec|features)/})
14
- end
15
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
- spec.require_paths = ["lib"]
17
-
18
- spec.required_ruby_version = '~> 2.4'
19
-
20
- spec.add_dependency("async-io", "~> 1.5")
21
- spec.add_dependency("async-http", "~> 0.45")
22
- spec.add_dependency("async-await")
23
-
24
- spec.add_dependency("trenni-sanitize")
25
-
26
- spec.add_dependency('samovar', "~> 2.0")
27
-
28
- spec.add_development_dependency "covered"
29
- spec.add_development_dependency "async-rspec"
30
- spec.add_development_dependency "bundler"
31
- spec.add_development_dependency "rake", "~> 10.0"
32
- spec.add_development_dependency "rspec", "~> 3.0"
33
- end