Only re-run the stackprof if I delete the prof output file.

This commit is contained in:
Parker Moore 2014-10-12 15:11:53 -07:00
parent b07cbcecbd
commit 0400ffe377
1 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,9 @@ command -v stackprof > /dev/null || 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} }"
test -f "$PROF_OUTPUT_FILE" || {
bundle exec ruby -r./lib/jekyll -rstackprof \
-e "StackProf.run(mode: :cpu, out: '${PROF_OUTPUT_FILE}') { ${TEST_SCRIPT} }"
}
bundle exec stackprof $PROF_OUTPUT_FILE $@