未验证 提交 abe58721 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #3232 from taosdata/feature/sangshuduo/perftest-script-improve

change to v16/v20 instead of master/develop
......@@ -24,22 +24,46 @@ function runTest {
for r in ${!rowsPerRequest[@]}; do
for c in `seq 1 $clients`; do
totalRPR=0
OUTPUT_FILE=tdengineTestWrite-RPR${rowsPerRequest[$r]}-clients$c.out
if $v16 ; then
OUTPUT_FILE=tdengineTestWrite-v16-RPR${rowsPerRequest[$r]}-clients$c.out
else
OUTPUT_FILE=tdengineTestWrite-v20-RPR${rowsPerRequest[$r]}-clients$c.out
fi
for i in `seq 1 $NUM_LOOP`; do
restartTaosd
$TAOSD_DIR/taos -s "drop database db" > /dev/null 2>&1
printTo "loop i:$i, $TDTEST_DIR/tdengineTest \
if ! $printresultonly ; then
restartTaosd
$TAOSD_DIR/taos -s "drop database db" > /dev/null 2>&1
if $v16 ; then
printTo "loop i:$i, $TDTEST_DIR/tdengineTest \
-dataDir $DATA_DIR \
-numOfFiles $NUM_OF_FILES \
-w -clients $c \
-rowsPerRequest ${rowsPerRequest[$r]}"
$TDTEST_DIR/tdengineTest \
-dataDir $DATA_DIR \
-numOfFiles $NUM_OF_FILES \
-w -clients $c \
-rowsPerRequest ${rowsPerRequest[$r]} \
| tee $OUTPUT_FILE
-writeClients $c \
-rowsPerRequest ${rowsPerRequest[$r]} \
| tee $OUTPUT_FILE"
$TDTEST_DIR/tdengineTest \
-dataDir $DATA_DIR \
-numOfFiles $NUM_OF_FILES \
-writeClients $c \
-rowsPerRequest ${rowsPerRequest[$r]} \
| tee $OUTPUT_FILE
else
printTo "loop i:$i, $TDTEST_DIR/tdengineTest \
-dataDir $DATA_DIR \
-numOfFiles $NUM_OF_FILES \
-w -clients $c \
-rowsPerRequest ${rowsPerRequest[$r]} \
| tee $OUTPUT_FILE"
$TDTEST_DIR/tdengineTest \
-dataDir $DATA_DIR \
-numOfFiles $NUM_OF_FILES \
-w -clients $c \
-rowsPerRequest ${rowsPerRequest[$r]} \
| tee $OUTPUT_FILE
fi
fi
RPR=`cat $OUTPUT_FILE | grep speed | awk '{print $(NF-1)}'`
totalRPR=`echo "scale=4; $totalRPR + $RPR" | bc`
printTo "rows:${rowsPerRequest[$r]}, clients:$c, i:$i RPR:$RPR"
......@@ -86,25 +110,30 @@ function restartTaosd {
################ Main ################
master=false
develop=true
v16=false
v20=true
verbose=false
clients=1
printresultonly=false
while : ; do
case $1 in
printresultonly)
printresultonly=true
shift ;;
-v)
verbose=true
shift ;;
master)
master=true
develop=false
v16)
v16=true
v20=false
shift ;;
develop)
master=false
develop=true
v20)
v16=false
v20=true
shift ;;
-c)
......@@ -120,19 +149,24 @@ while : ; do
esac
done
if $master ; then
echo "Test master branch.."
cp /mnt/root/cfg/master/taos.cfg /etc/taos/taos.cfg
WORK_DIR=/mnt/root/TDengine.master
if $v16 ; then
echo "Test v16 branch.."
WORK_DIR=/mnt/root/TDengine.v16
cp /mnt/root/cfg/v16/taos.cfg /etc/taos/taos.cfg
else
echo "Test develop branch.."
cp /mnt/root/cfg/develop/taos.cfg /etc/taos/taos.cfg
echo "Test v20 branch.."
cp /mnt/root/cfg/v20/taos.cfg /etc/taos/taos.cfg
WORK_DIR=/mnt/root/TDengine
fi
TAOSD_DIR=$WORK_DIR/debug/build/bin
TDTEST_DIR=$WORK_DIR/tests/comparisonTest/tdengine
if [ ! -f $TDTEST_DIR/tdengineTest ]; then
echo "Please build tdengineTest first!"
exit 1
fi
runTest
echo "Test done!"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册