Sha256: 2bdcfd33688049b75cc1ec2d77557b167c2a2df20c2c32dd23dd52f9bc365db9
Contents?: true
Size: 344 Bytes
Versions: 4
Compression:
Stored size: 344 Bytes
Contents
require 'lightio' # apply monkey patch at beginning LightIO::Monkey.patch_all! require 'net/http' host = 'github.com' port = 443 start = Time.now 10.times.map do Thread.new do Net::HTTP.start(host, port, use_ssl: true) do |http| res = http.request_get('/ping') p res.code end end end.each(&:join) p Time.now - start
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lightio-0.4.4 | examples/http_requests.rb |
lightio-0.4.3 | examples/http_requests.rb |
lightio-0.4.2 | examples/http_requests.rb |
lightio-0.4.1 | examples/http_requests.rb |