sibanu_web/public/assets/vendor/jekyll/script/stackprof
2022-08-20 13:21:23 +07:00

17 lines
454 B
Bash

#!/usr/bin/env bash
set -e
export BENCHMARK=true
command -v stackprof > /dev/null || script/bootstrap
TEST_SCRIPT="Jekyll::Commands::Build.process({'source' => 'site'})"
PROF_OUTPUT_FILE=tmp/stackprof-$(date +%Y%m%d%H%M).dump
test -f "$PROF_OUTPUT_FILE" || {
bundle exec ruby -r./lib/jekyll -rstackprof \
-e "StackProf.run(mode: :cpu, interval: 100, out: '${PROF_OUTPUT_FILE}') { ${TEST_SCRIPT} }"
}
bundle exec stackprof $PROF_OUTPUT_FILE $@