Revision 8fae0052c8e0888953da159045909ea2c1336b3d authored by Semen Zhydenko on 11 February 2018, 02:58:13 UTC, committed by jekyllbot on 11 February 2018, 02:58:13 UTC
Merge pull request 6764
1 parent 33017b7
Raw File
rubyprof
#!/usr/bin/env bash

export BENCHMARK=1

TEST_SCRIPT="Jekyll::Commands::Build.process({'source' => 'site'})"

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}"
back to top