lib/benchmark/http/command/concurrency.rb in benchmark-http-0.8.0 vs lib/benchmark/http/command/concurrency.rb in benchmark-http-0.8.1
- old
+ new
@@ -21,11 +21,11 @@
require_relative '../seconds'
require_relative '../statistics'
require 'async'
require 'async/http/client'
-require 'async/http/url_endpoint'
+require 'async/http/endpoint'
require 'samovar'
module Benchmark
module HTTP
@@ -72,11 +72,11 @@
return statistics
end
def run(url)
- endpoint = Async::HTTP::URLEndpoint.parse(url)
+ endpoint = Async::HTTP::Endpoint.parse(url)
request_path = endpoint.url.request_uri
puts "I am going to benchmark #{url}..."
Async::Reactor.run do |task|
@@ -114,10 +114,10 @@
puts "At this level of concurrency, requests have ~#{(statistics.last.latency / statistics.first.latency).round(2)}x higher latency."
end
end
- def invoke(parent)
+ def call
@hosts.each do |host|
run(host).wait
end
end
end