Sha256: ae43bca1e4734918cf4b46cededb8421794f86e12290e63043dfc02115f48b91

Contents?: true

Size: 443 Bytes

Versions: 10

Compression:

Stored size: 443 Bytes

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'grape'
require 'benchmark/ips'

api = Class.new(Grape::API) do
  prefix :api
  version 'v1', using: :path
  params do
    requires :param, type: Array[String]
  end
  get '/' do
    'hello'
  end
end

env = Rack::MockRequest.env_for('/api/v1?param=value', method: 'GET')

Benchmark.ips do |ips|
  ips.report('simple_with_type_coercer') do
    api.call(env)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
grape-1.2.4 benchmark/simple_with_type_coercer.rb
grape-1.2.3 benchmark/simple_with_type_coercer.rb
grape-1.2.2 benchmark/simple_with_type_coercer.rb
grape-1.2.1 benchmark/simple_with_type_coercer.rb
grape-1.2.0 benchmark/simple_with_type_coercer.rb
grape-1.1.0 benchmark/simple_with_type_coercer.rb
grape-1.0.3 benchmark/simple_with_type_coercer.rb
grape-1.0.2 benchmark/simple_with_type_coercer.rb
grape-1.0.1 benchmark/simple_with_type_coercer.rb
grape-1.0.0 benchmark/simple_with_type_coercer.rb