Sha256: 3cf0aa4d10458bdb79985d44431610f88a68cf589dfbe3eebd92237fcca276b3

Contents?: true

Size: 439 Bytes

Versions: 1

Compression:

Stored size: 439 Bytes

Contents

require 'benchmark'
require 'httparty'
require 'rack/amqp/curl'
require 'rack/amqp/client'


n = 5_000

Benchmark.bm do |bm|

  bm.report("HTTP:") do
    n.times do
      HTTParty.get("http://localhost:9292/users.json")
    end
  end
  bm.report("AMQP") do
    Rack::AMQP::Client.with_client(host: 'localhost') do |client|
      n.times do
        client.request('test.simple/users.json', {http_method: 'GET'})
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
amqurl-0.0.1 benchy.rb