updated benchmarking tools

This commit is contained in:
Andy Arthur
2022-02-23 13:47:29 -08:00
parent fee65bf8f2
commit d581cb0aee
3 changed files with 63 additions and 0 deletions

View File

@@ -131,6 +131,9 @@ require (
replace (
github.com/dolthub/dolt/go/gen/proto/dolt/services/eventsapi => ./gen/proto/dolt/services/eventsapi
github.com/oliveagle/jsonpath => github.com/dolthub/jsonpath v0.0.0-20210609232853-d49537a30474
github.com/dolthub/go-mysql-server => ../../go-mysql-server
github.com/dolthub/vitess => ../../vitess
)
go 1.17

View File

@@ -16,6 +16,13 @@ do
--new-nbf) export DOLT_FORMAT_FEATURE_FLAG=true
;;
--new-new) export DOLT_FORMAT_FEATURE_FLAG=true &&
export ENABLE_ROW_ITER_2=true
;;
--no-exchange) export SINGLE_THREAD_FEATURE_FLAG=true
;;
# benchmark with pprof profiling
--pprof) PPROF=1
;;
@@ -105,8 +112,14 @@ sysbench \
--mysql-host="0.0.0.0" \
--mysql-user="user" \
--mysql-password="pass" \
--db-ps-mode=disable \
"$SYSBENCH_TEST" run
unset DOLT_FORMAT_FEATURE_FLAG
unset ENABLE_ROW_ITER_2
unset SINGLE_THREAD_FEATURE_FLAG
unset GOMAXPROCS
echo "benchmark $SYSBENCH_TEST complete at $WORKING_DIR"
echo "DOLT_FORMAT_FEATURE_FLAG='$DOLT_FORMAT_FEATURE_FLAG'"
echo ""

View File

@@ -0,0 +1,47 @@
#!/bin/bash
set -e
set -o pipefail
SYSBENCH_TEST="oltp_point_select"
WORKING_DIR=`mktemp -d`
PPROF=0
# parse options
# superuser.com/questions/186272/
while test $# -gt 0
do
case "$1" in
# specify sysbench benchmark
*) SYSBENCH_TEST="$1"
;;
esac
shift
done
if [ ! -d "./sysbench-lua-scripts" ]; then
git clone https://github.com/dolthub/sysbench-lua-scripts.git
fi
pushd sysbench-lua-scripts
sleep 1
sysbench \
--mysql-host="127.0.0.1" \
--mysql-user="root" \
--mysql-password="toor" \
--mysql-port=3316 \
"$SYSBENCH_TEST" prepare
# run benchmark
echo "benchmark $SYSBENCH_TEST starting at $WORKING_DIR"
sysbench \
--mysql-host="127.0.0.1" \
--mysql-user="root" \
--mysql-password="toor" \
--mysql-port=3316 \
--db-ps-mode=disable \
"$SYSBENCH_TEST" run
popd