Merge pull request #2993 from jekyll/benchmarking
This commit is contained in:
commit
ce8d8d929c
5
Gemfile
5
Gemfile
|
@ -1,2 +1,7 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
|
if ENV['BENCHMARK']
|
||||||
|
gem 'rbtrace'
|
||||||
|
gem 'stackprof'
|
||||||
|
end
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
export BENCHMARK=true
|
||||||
|
script/bootstrap
|
||||||
|
|
||||||
|
TEST_SCRIPT="Jekyll::Commands::Build.process({'source' => 'site'})"
|
||||||
|
PROF_OUTPUT_FILE=tmp/stackprof-$(date +%Y%m%d).dump
|
||||||
|
|
||||||
|
bundle exec ruby -r./lib/jekyll -rstackprof -e "StackProf.run(mode: :cpu, out: '${PROF_OUTPUT_FILE}') { ${TEST_SCRIPT} }"
|
||||||
|
|
||||||
|
bundle exec stackprof $PROF_OUTPUT_FILE $@
|
Loading…
Reference in New Issue