Files
wehub-resource-sync 5357c39144
Fuzzer / Run Fuzzer (push) Has been cancelled
Race tests / Go race tests (ubuntu-22.04) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:01:40 +08:00

65 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -e
set -o pipefail
HOST="127.0.0.1"
PORT=3316
DBNAME="tpcc_test"
USER="root"
PASS="toor"
if [ ! -d "./sysbench-tpcc" ]; then
git clone https://github.com/Percona-Lab/sysbench-tpcc.git
fi
pushd sysbench-tpcc
./tpcc.lua \
--db-driver="mysql" \
--mysql-db="$DBNAME" \
--mysql-host="$HOST" \
--mysql-port="$PORT" \
--mysql-user="$USER" \
--mysql-password="$PASS" \
--time=10 \
--report_interval=1 \
--threads=2 \
--tables=1 \
--scale=1 \
--trx_level="RR" \
cleanup
./tpcc.lua \
--db-driver="mysql" \
--mysql-db="$DBNAME" \
--mysql-host="$HOST" \
--mysql-port="$PORT" \
--mysql-user="$USER" \
--mysql-password="$PASS" \
--time=10 \
--report_interval=1 \
--threads=2 \
--tables=1 \
--scale=1 \
--trx_level="RR" \
prepare
./tpcc.lua \
--db-driver="mysql" \
--mysql-db="$DBNAME" \
--mysql-host="$HOST" \
--mysql-port="$PORT" \
--mysql-user="$USER" \
--mysql-password="$PASS" \
--time=10 \
--report_interval=1 \
--threads=2 \
--tables=1 \
--scale=1 \
--trx_level="RR" \
run
echo "benchmark TPC-C complete at $WORKING_DIR"