Files
jekyll/script/rubyprof
AJ Acevedo b0fa2462a6 Updated the scripts shebang for portability
- Updated all of the sh and bash shebangs for consistency and portability.
- set -e to the test script for portability
Resolves #3857
2015-07-18 22:23:56 -04:00

20 lines
480 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}"