class Object

I honestly have no idea why this Object delegation is needed I keep staring at bootsnap and it doesn't have to do this is there a bug in their implementation they haven't caught or am I doing something different?

Constants

CURL_HTTP_HEADER_ARGS
DERAILED_APP
DERAILED_SCRIPT_COUNT
HTTP_HEADERS
HTTP_HEADER_PREFIX
PATH_TO_HIT
RACK_HTTP_HEADERS
TEST_COUNT
TOP_REQUIRE

Top level node that will store all require information for the entire app

WARM_COUNT

Public Instance Methods

call_app(path = File.join("/", PATH_TO_HIT)) click to toggle source
# File lib/derailed_benchmarks/load_tasks.rb, line 105
def call_app(path = File.join("/", PATH_TO_HIT))
  cmd = "curl #{CURL_HTTP_HEADER_ARGS} 'http://localhost:#{@port}#{path}' -s --fail 2>&1"
  response = `#{cmd}`
  unless $?.success?
    STDERR.puts "Couldn't call app."
    STDERR.puts "Bad request to #{cmd.inspect} \n\n***RESPONSE***:\n\n#{ response.inspect }"

    FileUtils.mkdir_p("tmp")
    File.open("tmp/fail.html", "w+") {|f| f.write response }

    `open #{File.expand_path("tmp/fail.html")}` if ENV["DERAILED_DEBUG"]

    exit(1)
  end
end
run!(cmd) click to toggle source
# File lib/derailed_benchmarks/tasks.rb, line 286
def run!(cmd)
  out = `#{cmd}`
  raise "Error while running #{cmd.inspect}: #{out}" unless $?.success?
  out
end

Private Instance Methods

load(path, wrap = false) click to toggle source
# File lib/derailed_benchmarks/core_ext/kernel_require.rb, line 81
def load(path, wrap = false)
  Kernel.load(path, wrap)
end
require(path) click to toggle source
# File lib/derailed_benchmarks/core_ext/kernel_require.rb, line 85
def require(path)
  Kernel.require(path)
end