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

modify argument of write loop script.

上级 16049c87
...@@ -5,7 +5,6 @@ NUM_LOOP=5 ...@@ -5,7 +5,6 @@ NUM_LOOP=5
NUM_OF_FILES=100 NUM_OF_FILES=100
rowsPerRequest=(1 100 500 1000 2000) rowsPerRequest=(1 100 500 1000 2000)
numOfClients=(1 2 3 4 5 6 7)
function printTo { function printTo {
if $verbose ; then if $verbose ; then
...@@ -15,7 +14,7 @@ function printTo { ...@@ -15,7 +14,7 @@ function printTo {
function runTest { function runTest {
printf "R/R, " printf "R/R, "
for c in ${numOfClients[@]}; do for c in `seq 1 $clients`; do
if [ "$c" == "1" ]; then if [ "$c" == "1" ]; then
printf "$c client, " printf "$c client, "
else else
...@@ -26,7 +25,7 @@ function runTest { ...@@ -26,7 +25,7 @@ function runTest {
for r in ${rowsPerRequest[@]}; do for r in ${rowsPerRequest[@]}; do
printf "$r, " printf "$r, "
for c in ${numOfClients[@]}; do for c in `seq 1 $clients`; do
totalRPR=0 totalRPR=0
for i in `seq 1 $NUM_LOOP`; do for i in `seq 1 $NUM_LOOP`; do
restartTaosd restartTaosd
...@@ -34,12 +33,12 @@ function runTest { ...@@ -34,12 +33,12 @@ function runTest {
printTo "loop i:$i, $TDTEST_DIR/tdengineTest \ printTo "loop i:$i, $TDTEST_DIR/tdengineTest \
-dataDir $DATA_DIR \ -dataDir $DATA_DIR \
-numOfFiles $NUM_OF_FILES \ -numOfFiles $NUM_OF_FILES \
-writeClients $c \ -w -clients $c \
-rowsPerRequest $r" -rowsPerRequest $r"
RPR=`$TDTEST_DIR/tdengineTest \ RPR=`$TDTEST_DIR/tdengineTest \
-dataDir $DATA_DIR \ -dataDir $DATA_DIR \
-numOfFiles 1 \ -numOfFiles 1 \
-writeClients $c \ -w -clients $c \
-rowsPerRequest $r \ -rowsPerRequest $r \
| grep speed | awk '{print $(NF-1)}'` | grep speed | awk '{print $(NF-1)}'`
totalRPR=`echo "scale=4; $totalRPR + $RPR" | bc` totalRPR=`echo "scale=4; $totalRPR + $RPR" | bc`
...@@ -73,25 +72,29 @@ function restartTaosd { ...@@ -73,25 +72,29 @@ function restartTaosd {
master=false master=false
develop=true develop=true
verbose=false verbose=false
clients=1
for arg in "$@" while : ; do
do case $1 in
case $arg in
-v) -v)
verbose=true verbose=true
;; shift ;;
master) master)
master=true master=true
develop=false develop=false
;; shift ;;
develop) develop)
master=false master=false
develop=true develop=true
;; shift ;;
-c)
clients=$2
shift 2;;
*) *)
;; break ;;
esac esac
done done
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册