提交 a3736583 编写于 作者: S Shuduo Sang

change to v16/v20 instead of master/develop

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