Add rbtrace and stackprof and a script/benchmark script.
This commit is contained in:
parent
cae5958362
commit
c2caaeaf11
5
Gemfile
5
Gemfile
|
@ -1,2 +1,7 @@
|
|||
source 'https://rubygems.org'
|
||||
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