/
githubmirror
/
tpcc-postgres
Обзор
Документация
Войти
/
githubmirror
/
tpcc-postgres
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docker/build-run-benchmark-with-docker.sh
47 строк
1 KB
Brian Kroth
CI checks on benchmark histograms and associated benchmark fixups (#268)
04 апр 2023, 19:04
Не верифицирован
04 апр 2023, 19:04
82c990d
Код
Авторство
О чём код?
#!/bin/bash set -eu set -x benchmark="${1:-noop}" # Let these pass through from the .env file from the devcontainer. export BENCHBASE_PROFILE="${BENCHBASE_PROFILE:-postgres}" export BENCHBASE_PROFILES="$BENCHBASE_PROFILE" # When we are running the full image we don't generally want to have to rebuild it repeatedly. export CLEAN_BUILD="${CLEAN_BUILD:-false}" # Move to the repo root. scriptdir=$(dirname "$(readlink -f "$0")") rootdir=$(readlink -f "$scriptdir/..") cd "$rootdir" if [ "$BENCHBASE_PROFILE" == 'sqlite' ]; then # Map the sqlite db back to the host. touch $PWD/$benchmark.db SRC_DIR="$PWD" if [ -n "$LOCAL_WORKSPACE_FOLDER" ]; then SRC_DIR="$LOCAL_WORKSPACE_FOLDER" fi EXTRA_DOCKER_ARGS="-v $SRC_DIR/$benchmark.db:/benchbase/profiles/sqlite/$benchmark.db" else if [ ! -x "docker/${BENCHBASE_PROFILE}-latest/up.sh" ]; then echo "ERROR: No docker up.sh script available for '$BENCHBASE_PROFILE'" fi "./docker/${BENCHBASE_PROFILE}-latest/up.sh" fi CREATE_DB_ARGS='--create=true --load=true' if [ "${SKIP_LOAD_DB:-false}" == 'true' ]; then CREATE_DB_ARGS='' fi SKIP_TESTS=${SKIP_TESTS:-true} EXTRA_DOCKER_ARGS="--network=host $EXTRA_DOCKER_ARGS" \ ./docker/benchbase/run-full-image.sh \ --config "config/sample_${benchmark}_config.xml" --bench "$benchmark" \ $CREATE_DB_ARGS --execute=true \ --sample 1 --interval-monitor 1000 \ --json-histograms results/histograms.json ./scripts/check_histogram_results.sh results/historgrams.json