19 lines
479 B
Bash
Executable File
19 lines
479 B
Bash
Executable File
#!/usr/bin/env bash
|
|
export BENCHMARK=1
|
|
|
|
TEST_SCRIPT="Jekyll::Commands::Build.process({'source' => 'site', 'full_rebuild' => true})"
|
|
|
|
RUBY=$(cat <<RUBY
|
|
require 'ruby-prof'
|
|
result = RubyProf.profile{ ${TEST_SCRIPT} }
|
|
printer = RubyProf::CallTreePrinter.new(result)
|
|
filename = "tmp/ruby_prof_#{rand 10000}"
|
|
puts "Writing profile to #{filename}"
|
|
file = File.open(filename, "w")
|
|
printer.print(file, {})
|
|
file.close
|
|
RUBY
|
|
)
|
|
|
|
bundle exec ruby -r ./lib/jekyll -e "${RUBY}"
|