Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vrp benchmark #2096

Merged
merged 7 commits into from
Aug 21, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix hashie error
  • Loading branch information
Braktar committed Aug 20, 2020
commit 21ed5793efcd1b99d6c472402b50f1be83b3c7cd
7 changes: 6 additions & 1 deletion benchmark/large_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require 'grape'
require 'ruby-prof'
require 'hashie'
require 'benchmark/ips'

class ScheduleType
Expand Down Expand Up @@ -36,6 +37,10 @@ class API < Grape::API
# include Grape::Extensions::Hash::ParamBuilder
# include Grape::Extensions::Hashie::Mash::ParamBuilder

rescue_from StandardError do |e|
STDERR.puts "\n\n#{e.class} (#{e.message}):\n " + e.backtrace.join("\n ") + "\n\n" if ENV['APP_ENV'] != 'test'
end

prefix :api
version 'v1', using: :path

Expand Down Expand Up @@ -257,7 +262,7 @@ def self.vrp_request_schedule(this)

result = RubyProf.profile do
start = Time.now
API.call env
API.call env
puts Time.now - start
end
printer = RubyProf::FlatPrinter.new(result)
Expand Down