Sha256: ae0f97c4b3769c5ff2f8c4a2fb119c9a06cd9ecf52fee2ad3ef21a0b3830cd8a

Contents?: true

Size: 344 Bytes

Versions: 1

Compression:

Stored size: 344 Bytes

Contents

require 'lightio'
# apply monkey patch at beginning
LightIO::Monkey.patch_all!

require 'net/http'

host = 'github.com'
port = 80

start = Time.now

10.times.map do
  Thread.new do
    Net::HTTP.start(host, port, use_ssl: false) do |http|
      res = http.request_get('/ping')
      p res.code
    end
  end
end.each(&:join)

p Time.now - start

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lightio-0.4.0 examples/http_requests.rb