Sha256: c22cdc916ce49151d9b3b6e5f93cd2ba7761adfb46f33624eaf66f5993360f92

Contents?: true

Size: 491 Bytes

Versions: 59

Compression:

Stored size: 491 Bytes

Contents

rack_api_lib_folder = File.join(File.dirname(__FILE__), '..', 'lib')
$LOAD_PATH.unshift(rack_api_lib_folder)

require "rack/app"
require "rack/mock"
require "benchmark"

class App < Rack::App

  get "/a/b/c/:d/e/f/:g/h/i/j/k/l/m/n/o/p/q/:something" do
    return 'Hello, World!'
  end

end


request = Rack::MockRequest.new(App)

Benchmark.bm do |x|
  x.report do
    request.get("/a/b/c/dog/e/f/goat/h/i/j/k/l/m/n/o/p/q/chicken" )
  end
end

result = Benchmark.measure do

end

puts result

Version data entries

59 entries across 59 versions & 2 rubygems

Version Path
rack-app-11.0.2 spike/long_endpoint.rb
rack-app-11.0.1 spike/long_endpoint.rb
rack-app-11.0.0 spike/long_endpoint.rb
rack-app-10.0.0 spike/long_endpoint.rb
rack-app-9.0.0 spike/long_endpoint.rb
rack-app-8.1.0 spike/long_endpoint.rb
rack-app-8.0.1 spike/long_endpoint.rb
rack-app-8.0.0 spike/long_endpoint.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/rack-app-7.7.0/spike/long_endpoint.rb
rack-app-7.7.0 spike/long_endpoint.rb
rack-app-7.6.5 spike/long_endpoint.rb
rack-app-7.6.4 spike/long_endpoint.rb
rack-app-7.6.3 spike/long_endpoint.rb
rack-app-7.6.2 spike/long_endpoint.rb
rack-app-7.6.1 spike/long_endpoint.rb
rack-app-7.6.0 spike/long_endpoint.rb
rack-app-7.5.2 spike/long_endpoint.rb
rack-app-7.5.1 spike/long_endpoint.rb
rack-app-7.5.0 spike/long_endpoint.rb
rack-app-7.4.0 spike/long_endpoint.rb