update influxdb test scripts
This commit is contained in:
parent
6cfbaefea7
commit
100e4d3f98
|
@ -8,4 +8,3 @@ select * from devices where devgroup='60';
|
|||
select * from devices where devgroup='70';
|
||||
select * from devices where devgroup='80';
|
||||
select * from devices where devgroup='90';
|
||||
|
||||
|
|
|
@ -58,4 +58,3 @@ select spread(temperature) from devices where devgroup=~/[1-7][0-9]/;
|
|||
select spread(temperature) from devices where devgroup=~/[1-8][0-9]/;
|
||||
select spread(temperature) from devices where devgroup=~/[1-9][0-9]/;
|
||||
select spread(temperature) from devices;
|
||||
|
||||
|
|
|
@ -8,4 +8,3 @@ select count(temperature), sum(temperature), mean(temperature) from devices wher
|
|||
select count(temperature), sum(temperature), mean(temperature) from devices where devgroup=~/[1-8][0-9]/ group by devgroup;
|
||||
select count(temperature), sum(temperature), mean(temperature) from devices where devgroup=~/[1-9][0-9]/ group by devgroup;
|
||||
select count(temperature), sum(temperature), mean(temperature) from devices group by devgroup;
|
||||
|
||||
|
|
|
@ -8,4 +8,3 @@ select count(temperature), sum(temperature), mean(temperature) from devices wher
|
|||
select count(temperature), sum(temperature), mean(temperature) from devices where devgroup=~/[1-8][0-9]/ group by time(1m);
|
||||
select count(temperature), sum(temperature), mean(temperature) from devices where devgroup=~/[1-9][0-9]/ group by time(1m);
|
||||
select count(temperature), sum(temperature), mean(temperature) from devices group by time(1m);
|
||||
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
#!/bin/bash
|
||||
|
||||
NUM_LOOP=5
|
||||
|
||||
function printTo {
|
||||
if $verbose ; then
|
||||
echo $1
|
||||
fi
|
||||
}
|
||||
|
||||
INFLUXDBTESTQ1OUT=influxdbTestQ1.out
|
||||
|
||||
function runTest {
|
||||
totalG0=0
|
||||
totalG10=0
|
||||
totalG20=0
|
||||
totalG30=0
|
||||
totalG40=0
|
||||
totalG50=0
|
||||
totalG60=0
|
||||
totalG70=0
|
||||
totalG80=0
|
||||
totalG90=0
|
||||
for i in `seq 1 $NUM_LOOP`; do
|
||||
printTo "loop i:$i, $INFLUXDBTEST_DIR/infludbTest \
|
||||
-sql $INFLUXDBTEST_DIR/q1.txt"
|
||||
$INFLUXDBTEST_DIR/influxdbTest \
|
||||
-sql $INFLUXDBTEST_DIR/q1.txt 2>&1 \
|
||||
| tee $INFLUXDBTESTQ1OUT
|
||||
G0=`grep "devgroup='0'" $INFLUXDBTESTQ1OUT| awk '{print $5}'`
|
||||
totalG0=`echo "scale=4; $totalG0 + $G0" | bc`
|
||||
G10=`grep "devgroup='10'" $INFLUXDBTESTQ1OUT| awk '{print $5}'`
|
||||
totalG10=`echo "scale=4; $totalG10 + $G10" | bc`
|
||||
G20=`grep "devgroup='20'" $INFLUXDBTESTQ1OUT| awk '{print $5}'`
|
||||
totalG20=`echo "scale=4; $totalG20 + $G20" | bc`
|
||||
G30=`grep "devgroup='30'" $INFLUXDBTESTQ1OUT| awk '{print $5}'`
|
||||
totalG30=`echo "scale=4; $totalG30 + $G30" | bc`
|
||||
G40=`grep "devgroup='40'" $INFLUXDBTESTQ1OUT| awk '{print $5}'`
|
||||
totalG40=`echo "scale=4; $totalG40 + $G40" | bc`
|
||||
G50=`grep "devgroup='50'" $INFLUXDBTESTQ1OUT| awk '{print $5}'`
|
||||
totalG50=`echo "scale=4; $totalG50 + $G50" | bc`
|
||||
G60=`grep "devgroup='60'" $INFLUXDBTESTQ1OUT| awk '{print $5}'`
|
||||
totalG60=`echo "scale=4; $totalG60 + $G60" | bc`
|
||||
G70=`grep "devgroup='70'" $INFLUXDBTESTQ1OUT| awk '{print $5}'`
|
||||
totalG70=`echo "scale=4; $totalG70 + $G70" | bc`
|
||||
G80=`grep "devgroup='80'" $INFLUXDBTESTQ1OUT| awk '{print $5}'`
|
||||
totalG80=`echo "scale=4; $totalG80 + $G80" | bc`
|
||||
G90=`grep "devgroup='90'" $INFLUXDBTESTQ1OUT| awk '{print $5}'`
|
||||
totalG90=`echo "scale=4; $totalG90 + $G90" | bc`
|
||||
done
|
||||
avgG0=`echo "scale=4; x = $totalG0 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG10=`echo "scale=4; x = $totalG10 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG20=`echo "scale=4; x = $totalG20 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG30=`echo "scale=4; x = $totalG30 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG40=`echo "scale=4; x = $totalG40 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG50=`echo "scale=4; x = $totalG50 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG60=`echo "scale=4; x = $totalG60 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG70=`echo "scale=4; x = $totalG70 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG80=`echo "scale=4; x = $totalG80 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG90=`echo "scale=4; x = $totalG90 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
echo "Latency, G-0, G-10, G-20, G-30, G-40, G-50, G-60, G-70, G-80, G-90"
|
||||
echo "OpenINFLUXDB, $avgG0, $avgG10, $avgG20, $avgG30, $avgG40, $avgG50, $avgG60, $avgG70, $avgG80, $avgG90"
|
||||
}
|
||||
|
||||
################ Main ################
|
||||
|
||||
master=false
|
||||
develop=true
|
||||
verbose=false
|
||||
|
||||
clients=1
|
||||
|
||||
while : ; do
|
||||
case $1 in
|
||||
-v)
|
||||
verbose=true
|
||||
shift ;;
|
||||
|
||||
-c)
|
||||
clients=$2
|
||||
shift 2;;
|
||||
|
||||
-n)
|
||||
NUM_LOOP=$2
|
||||
shift 2;;
|
||||
|
||||
*)
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
WORK_DIR=/mnt/root/TDengine
|
||||
INFLUXDBTEST_DIR=$WORK_DIR/tests/comparisonTest/influxdb
|
||||
|
||||
runTest
|
||||
|
||||
printTo "Test done!"
|
|
@ -0,0 +1,318 @@
|
|||
#!/bin/bash
|
||||
|
||||
NUM_LOOP=5
|
||||
|
||||
function printTo {
|
||||
if $verbose ; then
|
||||
echo $1
|
||||
fi
|
||||
}
|
||||
|
||||
INFLUXDBTESTQ2OUT=influxdbTestQ2.out
|
||||
|
||||
function runTest {
|
||||
totalCount10=0
|
||||
totalCount20=0
|
||||
totalCount30=0
|
||||
totalCount40=0
|
||||
totalCount50=0
|
||||
totalCount60=0
|
||||
totalCount70=0
|
||||
totalCount80=0
|
||||
totalCount90=0
|
||||
totalCount100=0
|
||||
|
||||
totalMean10=0
|
||||
totalMean20=0
|
||||
totalMean30=0
|
||||
totalMean40=0
|
||||
totalMean50=0
|
||||
totalMean60=0
|
||||
totalMean70=0
|
||||
totalMean80=0
|
||||
totalMean90=0
|
||||
totalMean100=0
|
||||
|
||||
totalSum10=0
|
||||
totalSum20=0
|
||||
totalSum30=0
|
||||
totalSum40=0
|
||||
totalSum50=0
|
||||
totalSum60=0
|
||||
totalSum70=0
|
||||
totalSum80=0
|
||||
totalSum90=0
|
||||
totalSum100=0
|
||||
|
||||
totalMax10=0
|
||||
totalMax20=0
|
||||
totalMax30=0
|
||||
totalMax40=0
|
||||
totalMax50=0
|
||||
totalMax60=0
|
||||
totalMax70=0
|
||||
totalMax80=0
|
||||
totalMax90=0
|
||||
totalMax100=0
|
||||
|
||||
totalMin10=0
|
||||
totalMin20=0
|
||||
totalMin30=0
|
||||
totalMin40=0
|
||||
totalMin50=0
|
||||
totalMin60=0
|
||||
totalMin70=0
|
||||
totalMin80=0
|
||||
totalMin90=0
|
||||
totalMin100=0
|
||||
|
||||
totalSpread10=0
|
||||
totalSpread20=0
|
||||
totalSpread30=0
|
||||
totalSpread40=0
|
||||
totalSpread50=0
|
||||
totalSpread60=0
|
||||
totalSpread70=0
|
||||
totalSpread80=0
|
||||
totalSpread90=0
|
||||
totalSpread100=0
|
||||
|
||||
for i in `seq 1 $NUM_LOOP`; do
|
||||
printTo "loop i:$i, $INFLUXDBTEST_DIR/influxdbTest \
|
||||
-sql $INFLUXDBTEST_DIR/q2.txt"
|
||||
$INFLUXDBTEST_DIR/influxdbTest \
|
||||
-sql $INFLUXDBTEST_DIR/q2.txt 2>&1 \
|
||||
| tee $INFLUXDBTESTQ2OUT
|
||||
|
||||
Count10=`cat $INFLUXDBTESTQ2OUT | grep count | grep "devgroup=~\/\[1-1\]" | awk '{print $5}'`
|
||||
totalCount10=`echo "scale=4; $totalCount10 + $Count10" | bc`
|
||||
Count20=`cat $INFLUXDBTESTQ2OUT | grep count | grep "devgroup=~\/\[1-2\]" | awk '{print $5}'`
|
||||
totalCount20=`echo "scale=4; $totalCount20 + $Count20" | bc`
|
||||
Count30=`cat $INFLUXDBTESTQ2OUT | grep count | grep "devgroup=~\/\[1-3\]" | awk '{print $5}'`
|
||||
totalCount30=`echo "scale=4; $totalCount30 + $Count30" | bc`
|
||||
Count40=`cat $INFLUXDBTESTQ2OUT | grep count | grep "devgroup=~\/\[1-4\]" | awk '{print $5}'`
|
||||
totalCount40=`echo "scale=4; $totalCount40 + $Count40" | bc`
|
||||
Count50=`cat $INFLUXDBTESTQ2OUT | grep count | grep "devgroup=~\/\[1-5\]" | awk '{print $5}'`
|
||||
totalCount50=`echo "scale=4; $totalCount50 + $Count50" | bc`
|
||||
Count60=`cat $INFLUXDBTESTQ2OUT | grep count | grep "devgroup=~\/\[1-6\]" | awk '{print $5}'`
|
||||
totalCount60=`echo "scale=4; $totalCount60 + $Count60" | bc`
|
||||
Count70=`cat $INFLUXDBTESTQ2OUT | grep count | grep "devgroup=~\/\[1-7\]" | awk '{print $5}'`
|
||||
totalCount70=`echo "scale=4; $totalCount70 + $Count70" | bc`
|
||||
Count80=`cat $INFLUXDBTESTQ2OUT | grep count | grep "devgroup=~\/\[1-8\]" | awk '{print $5}'`
|
||||
totalCount80=`echo "scale=4; $totalCount80 + $Count80" | bc`
|
||||
Count90=`cat $INFLUXDBTESTQ2OUT | grep count | grep "devgroup=~\/\[1-9\]" | awk '{print $5}'`
|
||||
totalCount90=`echo "scale=4; $totalCount90 + $Count90" | bc`
|
||||
Count100=`cat $INFLUXDBTESTQ2OUT | grep count | grep "devices;" | awk '{print $5}'`
|
||||
totalCount100=`echo "scale=4; $totalCount100 + $Count100" | bc`
|
||||
|
||||
Mean10=`cat $INFLUXDBTESTQ2OUT | grep mean | grep "devgroup=~\/\[1-1\]" | awk '{print $5}'`
|
||||
totalMean10=`echo "scale=4; $totalMean10 + $Mean10" | bc`
|
||||
Mean20=`cat $INFLUXDBTESTQ2OUT | grep mean | grep "devgroup=~\/\[1-2\]" | awk '{print $5}'`
|
||||
totalMean20=`echo "scale=4; $totalMean20 + $Mean20" | bc`
|
||||
Mean30=`cat $INFLUXDBTESTQ2OUT | grep mean | grep "devgroup=~\/\[1-3\]" | awk '{print $5}'`
|
||||
totalMean30=`echo "scale=4; $totalMean30 + $Mean30" | bc`
|
||||
Mean40=`cat $INFLUXDBTESTQ2OUT | grep mean | grep "devgroup=~\/\[1-4\]" | awk '{print $5}'`
|
||||
totalMean40=`echo "scale=4; $totalMean40 + $Mean40" | bc`
|
||||
Mean50=`cat $INFLUXDBTESTQ2OUT | grep mean | grep "devgroup=~\/\[1-5\]" | awk '{print $5}'`
|
||||
totalMean50=`echo "scale=4; $totalMean50 + $Mean50" | bc`
|
||||
Mean60=`cat $INFLUXDBTESTQ2OUT | grep mean | grep "devgroup=~\/\[1-6\]" | awk '{print $5}'`
|
||||
totalMean60=`echo "scale=4; $totalMean60 + $Mean60" | bc`
|
||||
Mean70=`cat $INFLUXDBTESTQ2OUT | grep mean | grep "devgroup=~\/\[1-7\]" | awk '{print $5}'`
|
||||
totalMean70=`echo "scale=4; $totalMean70 + $Mean70" | bc`
|
||||
Mean80=`cat $INFLUXDBTESTQ2OUT | grep mean | grep "devgroup=~\/\[1-8\]" | awk '{print $5}'`
|
||||
totalMean80=`echo "scale=4; $totalMean80 + $Mean80" | bc`
|
||||
Mean90=`cat $INFLUXDBTESTQ2OUT | grep mean | grep "devgroup=~\/\[1-9\]" | awk '{print $5}'`
|
||||
totalMean90=`echo "scale=4; $totalMean90 + $Mean90" | bc`
|
||||
Mean100=`cat $INFLUXDBTESTQ2OUT | grep mean | grep "devices;" | awk '{print $5}'`
|
||||
totalMean100=`echo "scale=4; $totalMean100 + $Mean100" | bc`
|
||||
|
||||
Sum10=`cat $INFLUXDBTESTQ2OUT | grep sum | grep "devgroup=~\/\[1-1\]" | awk '{print $5}'`
|
||||
totalSum10=`echo "scale=4; $totalSum10 + $Sum10" | bc`
|
||||
Sum20=`cat $INFLUXDBTESTQ2OUT | grep sum | grep "devgroup=~\/\[1-2\]" | awk '{print $5}'`
|
||||
totalSum20=`echo "scale=4; $totalSum20 + $Sum20" | bc`
|
||||
Sum30=`cat $INFLUXDBTESTQ2OUT | grep sum | grep "devgroup=~\/\[1-3\]" | awk '{print $5}'`
|
||||
totalSum30=`echo "scale=4; $totalSum30 + $Sum30" | bc`
|
||||
Sum40=`cat $INFLUXDBTESTQ2OUT | grep sum | grep "devgroup=~\/\[1-4\]" | awk '{print $5}'`
|
||||
totalSum40=`echo "scale=4; $totalSum40 + $Sum40" | bc`
|
||||
Sum50=`cat $INFLUXDBTESTQ2OUT | grep sum | grep "devgroup=~\/\[1-5\]" | awk '{print $5}'`
|
||||
totalSum50=`echo "scale=4; $totalSum50 + $Sum50" | bc`
|
||||
Sum60=`cat $INFLUXDBTESTQ2OUT | grep sum | grep "devgroup=~\/\[1-6\]" | awk '{print $5}'`
|
||||
totalSum60=`echo "scale=4; $totalSum60 + $Sum60" | bc`
|
||||
Sum70=`cat $INFLUXDBTESTQ2OUT | grep sum | grep "devgroup=~\/\[1-7\]" | awk '{print $5}'`
|
||||
totalSum70=`echo "scale=4; $totalSum70 + $Sum70" | bc`
|
||||
Sum80=`cat $INFLUXDBTESTQ2OUT | grep sum | grep "devgroup=~\/\[1-8\]" | awk '{print $5}'`
|
||||
totalSum80=`echo "scale=4; $totalSum80 + $Sum80" | bc`
|
||||
Sum90=`cat $INFLUXDBTESTQ2OUT | grep sum | grep "devgroup=~\/\[1-9\]" | awk '{print $5}'`
|
||||
totalSum90=`echo "scale=4; $totalSum90 + $Sum90" | bc`
|
||||
Sum100=`cat $INFLUXDBTESTQ2OUT | grep sum | grep "devices;" | awk '{print $5}'`
|
||||
totalSum100=`echo "scale=4; $totalSum100 + $Sum100" | bc`
|
||||
|
||||
Max10=`cat $INFLUXDBTESTQ2OUT | grep max | grep "devgroup=~\/\[1-1\]" | awk '{print $5}'`
|
||||
totalMax10=`echo "scale=4; $totalMax10 + $Max10" | bc`
|
||||
Max20=`cat $INFLUXDBTESTQ2OUT | grep max | grep "devgroup=~\/\[1-2\]" | awk '{print $5}'`
|
||||
totalMax20=`echo "scale=4; $totalMax20 + $Max20" | bc`
|
||||
Max30=`cat $INFLUXDBTESTQ2OUT | grep max | grep "devgroup=~\/\[1-3\]" | awk '{print $5}'`
|
||||
totalMax30=`echo "scale=4; $totalMax30 + $Max30" | bc`
|
||||
Max40=`cat $INFLUXDBTESTQ2OUT | grep max | grep "devgroup=~\/\[1-4\]" | awk '{print $5}'`
|
||||
totalMax40=`echo "scale=4; $totalMax40 + $Max40" | bc`
|
||||
Max50=`cat $INFLUXDBTESTQ2OUT | grep max | grep "devgroup=~\/\[1-5\]" | awk '{print $5}'`
|
||||
totalMax50=`echo "scale=4; $totalMax50 + $Max50" | bc`
|
||||
Max60=`cat $INFLUXDBTESTQ2OUT | grep max | grep "devgroup=~\/\[1-6\]" | awk '{print $5}'`
|
||||
totalMax60=`echo "scale=4; $totalMax60 + $Max60" | bc`
|
||||
Max70=`cat $INFLUXDBTESTQ2OUT | grep max | grep "devgroup=~\/\[1-7\]" | awk '{print $5}'`
|
||||
totalMax70=`echo "scale=4; $totalMax70 + $Max70" | bc`
|
||||
Max80=`cat $INFLUXDBTESTQ2OUT | grep max | grep "devgroup=~\/\[1-8\]" | awk '{print $5}'`
|
||||
totalMax80=`echo "scale=4; $totalMax80 + $Max80" | bc`
|
||||
Max90=`cat $INFLUXDBTESTQ2OUT | grep max | grep "devgroup=~\/\[1-9\]" | awk '{print $5}'`
|
||||
totalMax90=`echo "scale=4; $totalMax90 + $Max90" | bc`
|
||||
Max100=`cat $INFLUXDBTESTQ2OUT | grep max | grep "devices;" | awk '{print $5}'`
|
||||
totalMax100=`echo "scale=4; $totalMax100 + $Max100" | bc`
|
||||
|
||||
Min10=`cat $INFLUXDBTESTQ2OUT | grep min | grep "devgroup=~\/\[1-1\]" | awk '{print $5}'`
|
||||
totalMin10=`echo "scale=4; $totalMin10 + $Min10" | bc`
|
||||
Min20=`cat $INFLUXDBTESTQ2OUT | grep min | grep "devgroup=~\/\[1-2\]" | awk '{print $5}'`
|
||||
totalMin20=`echo "scale=4; $totalMin20 + $Min20" | bc`
|
||||
Min30=`cat $INFLUXDBTESTQ2OUT | grep min | grep "devgroup=~\/\[1-3\]" | awk '{print $5}'`
|
||||
totalMin30=`echo "scale=4; $totalMin30 + $Min30" | bc`
|
||||
Min40=`cat $INFLUXDBTESTQ2OUT | grep min | grep "devgroup=~\/\[1-4\]" | awk '{print $5}'`
|
||||
totalMin40=`echo "scale=4; $totalMin40 + $Min40" | bc`
|
||||
Min50=`cat $INFLUXDBTESTQ2OUT | grep min | grep "devgroup=~\/\[1-5\]" | awk '{print $5}'`
|
||||
totalMin50=`echo "scale=4; $totalMin50 + $Min50" | bc`
|
||||
Min60=`cat $INFLUXDBTESTQ2OUT | grep min | grep "devgroup=~\/\[1-6\]" | awk '{print $5}'`
|
||||
totalMin60=`echo "scale=4; $totalMin60 + $Min60" | bc`
|
||||
Min70=`cat $INFLUXDBTESTQ2OUT | grep min | grep "devgroup=~\/\[1-7\]" | awk '{print $5}'`
|
||||
totalMin70=`echo "scale=4; $totalMin70 + $Min70" | bc`
|
||||
Min80=`cat $INFLUXDBTESTQ2OUT | grep min | grep "devgroup=~\/\[1-8\]" | awk '{print $5}'`
|
||||
totalMin80=`echo "scale=4; $totalMin80 + $Min80" | bc`
|
||||
Min90=`cat $INFLUXDBTESTQ2OUT | grep min | grep "devgroup=~\/\[1-9\]" | awk '{print $5}'`
|
||||
totalMin90=`echo "scale=4; $totalMin90 + $Min90" | bc`
|
||||
Min100=`cat $INFLUXDBTESTQ2OUT | grep min | grep "devices;" | awk '{print $5}'`
|
||||
totalMin100=`echo "scale=4; $totalMin100 + $Min100" | bc`
|
||||
|
||||
Spread10=`cat $INFLUXDBTESTQ2OUT | grep spread | grep "devgroup=~\/\[1-1\]" | awk '{print $5}'`
|
||||
totalSpread10=`echo "scale=4; $totalSpread10 + $Spread10" | bc`
|
||||
Spread20=`cat $INFLUXDBTESTQ2OUT | grep spread | grep "devgroup=~\/\[1-2\]" | awk '{print $5}'`
|
||||
totalSpread20=`echo "scale=4; $totalSpread20 + $Spread20" | bc`
|
||||
Spread30=`cat $INFLUXDBTESTQ2OUT | grep spread | grep "devgroup=~\/\[1-3\]" | awk '{print $5}'`
|
||||
totalSpread30=`echo "scale=4; $totalSpread30 + $Spread30" | bc`
|
||||
Spread40=`cat $INFLUXDBTESTQ2OUT | grep spread | grep "devgroup=~\/\[1-4\]" | awk '{print $5}'`
|
||||
totalSpread40=`echo "scale=4; $totalSpread40 + $Spread40" | bc`
|
||||
Spread50=`cat $INFLUXDBTESTQ2OUT | grep spread | grep "devgroup=~\/\[1-5\]" | awk '{print $5}'`
|
||||
totalSpread50=`echo "scale=4; $totalSpread50 + $Spread50" | bc`
|
||||
Spread60=`cat $INFLUXDBTESTQ2OUT | grep spread | grep "devgroup=~\/\[1-6\]" | awk '{print $5}'`
|
||||
totalSpread60=`echo "scale=4; $totalSpread60 + $Spread60" | bc`
|
||||
Spread70=`cat $INFLUXDBTESTQ2OUT | grep spread | grep "devgroup=~\/\[1-7\]" | awk '{print $5}'`
|
||||
totalSpread70=`echo "scale=4; $totalSpread70 + $Spread70" | bc`
|
||||
Spread80=`cat $INFLUXDBTESTQ2OUT | grep spread | grep "devgroup=~\/\[1-8\]" | awk '{print $5}'`
|
||||
totalSpread80=`echo "scale=4; $totalSpread80 + $Spread80" | bc`
|
||||
Spread90=`cat $INFLUXDBTESTQ2OUT | grep spread | grep "devgroup=~\/\[1-9\]" | awk '{print $5}'`
|
||||
totalSpread90=`echo "scale=4; $totalSpread90 + $Spread90" | bc`
|
||||
Spread100=`cat $INFLUXDBTESTQ2OUT | grep spread | grep "devices;" | awk '{print $5}'`
|
||||
totalSpread100=`echo "scale=4; $totalSpread100 + $Spread100" | bc`
|
||||
|
||||
done
|
||||
avgCount10=`echo "scale=4; x = $totalCount10 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgCount20=`echo "scale=4; x = $totalCount20 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgCount30=`echo "scale=4; x = $totalCount30 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgCount40=`echo "scale=4; x = $totalCount40 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgCount50=`echo "scale=4; x = $totalCount50 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgCount60=`echo "scale=4; x = $totalCount60 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgCount70=`echo "scale=4; x = $totalCount70 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgCount80=`echo "scale=4; x = $totalCount80 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgCount90=`echo "scale=4; x = $totalCount90 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgCount100=`echo "scale=4; x = $totalCount100 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
|
||||
avgMean10=`echo "scale=4; x = $totalMean10 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMean20=`echo "scale=4; x = $totalMean20 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMean30=`echo "scale=4; x = $totalMean30 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMean40=`echo "scale=4; x = $totalMean40 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMean50=`echo "scale=4; x = $totalMean50 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMean60=`echo "scale=4; x = $totalMean60 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMean70=`echo "scale=4; x = $totalMean70 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMean80=`echo "scale=4; x = $totalMean80 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMean90=`echo "scale=4; x = $totalMean90 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMean100=`echo "scale=4; x = $totalMean100 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
|
||||
avgSum10=`echo "scale=4; x = $totalSum10 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSum20=`echo "scale=4; x = $totalSum20 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSum30=`echo "scale=4; x = $totalSum30 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSum40=`echo "scale=4; x = $totalSum40 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSum50=`echo "scale=4; x = $totalSum50 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSum60=`echo "scale=4; x = $totalSum60 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSum70=`echo "scale=4; x = $totalSum70 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSum80=`echo "scale=4; x = $totalSum80 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSum90=`echo "scale=4; x = $totalSum90 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSum100=`echo "scale=4; x = $totalSum100 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
|
||||
avgMax10=`echo "scale=4; x = $totalMax10 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMax20=`echo "scale=4; x = $totalMax20 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMax30=`echo "scale=4; x = $totalMax30 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMax40=`echo "scale=4; x = $totalMax40 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMax50=`echo "scale=4; x = $totalMax50 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMax60=`echo "scale=4; x = $totalMax60 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMax70=`echo "scale=4; x = $totalMax70 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMax80=`echo "scale=4; x = $totalMax80 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMax90=`echo "scale=4; x = $totalMax90 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMax100=`echo "scale=4; x = $totalMax100 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
|
||||
avgMin10=`echo "scale=4; x = $totalMin10 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMin20=`echo "scale=4; x = $totalMin20 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMin30=`echo "scale=4; x = $totalMin30 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMin40=`echo "scale=4; x = $totalMin40 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMin50=`echo "scale=4; x = $totalMin50 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMin60=`echo "scale=4; x = $totalMin60 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMin70=`echo "scale=4; x = $totalMin70 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMin80=`echo "scale=4; x = $totalMin80 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMin90=`echo "scale=4; x = $totalMin90 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgMin100=`echo "scale=4; x = $totalMin100 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
|
||||
avgSpread10=`echo "scale=4; x = $totalSpread10 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSpread20=`echo "scale=4; x = $totalSpread20 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSpread30=`echo "scale=4; x = $totalSpread30 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSpread40=`echo "scale=4; x = $totalSpread40 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSpread50=`echo "scale=4; x = $totalSpread50 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSpread60=`echo "scale=4; x = $totalSpread60 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSpread70=`echo "scale=4; x = $totalSpread70 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSpread80=`echo "scale=4; x = $totalSpread80 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSpread90=`echo "scale=4; x = $totalSpread90 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgSpread100=`echo "scale=4; x = $totalSpread100 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
|
||||
echo "Latency, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%"
|
||||
echo "Count, $avgCount10, $avgCount20, $avgCount30, $avgCount40, $avgCount50, $avgCount60, $avgCount70, $avgCount80, $avgCount90, $avgCount100"
|
||||
echo "Mean, $avgMean10, $avgMean20, $avgMean30, $avgMean40, $avgMean50, $avgMean60, $avgMean70, $avgMean80, $avgMean90, $avgMean100"
|
||||
echo "Sum, $avgSum10, $avgSum20, $avgSum30, $avgSum40, $avgSum50, $avgSum60, $avgSum70, $avgSum80, $avgSum90, $avgSum100"
|
||||
echo "Max, $avgMax10, $avgMax20, $avgMax30, $avgMax40, $avgMax50, $avgMax60, $avgMax70, $avgMax80, $avgMax90, $avgMax100"
|
||||
echo "Min, $avgMin10, $avgMin20, $avgMin30, $avgMin40, $avgMin50, $avgMin60, $avgMin70, $avgMin80, $avgMin90, $avgMin100"
|
||||
echo "Spread, $avgSpread10, $avgSpread20, $avgSpread30, $avgSpread40, $avgSpread50, $avgSpread60, $avgSpread70, $avgSpread80, $avgSpread90, $avgSpread100"
|
||||
}
|
||||
|
||||
################ Main ################
|
||||
|
||||
verbose=false
|
||||
|
||||
for arg in "$@"
|
||||
do
|
||||
case $arg in
|
||||
-v)
|
||||
verbose=true
|
||||
shift ;;
|
||||
|
||||
-c)
|
||||
clients=$2
|
||||
shift 2;;
|
||||
|
||||
-n)
|
||||
NUM_LOOP=$2
|
||||
shift 2;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
WORK_DIR=/mnt/root/TDengine
|
||||
INFLUXDBTEST_DIR=$WORK_DIR/tests/comparisonTest/influxdb
|
||||
|
||||
runTest
|
||||
|
||||
printTo "Test done!"
|
|
@ -0,0 +1,94 @@
|
|||
#!/bin/bash
|
||||
|
||||
NUM_LOOP=5
|
||||
|
||||
function printTo {
|
||||
if $verbose ; then
|
||||
echo $1
|
||||
fi
|
||||
}
|
||||
|
||||
INFLUXDBTESTQ3OUT=opentsdbTestQ3.out
|
||||
|
||||
function runTest {
|
||||
totalG10=0
|
||||
totalG20=0
|
||||
totalG30=0
|
||||
totalG40=0
|
||||
totalG50=0
|
||||
totalG60=0
|
||||
totalG70=0
|
||||
totalG80=0
|
||||
totalG90=0
|
||||
totalG100=0
|
||||
for i in `seq 1 $NUM_LOOP`; do
|
||||
printTo "loop i:$i, $INFLUXDBTEST_DIR/influxdbTest \
|
||||
-sql $INFLUXDBTEST_DIR/q3.txt"
|
||||
$INFLUXDBTEST_DIR/influxdbTest \
|
||||
-sql $INFLUXDBTEST_DIR/q3.txt 2>&1 \
|
||||
| tee $INFLUXDBTESTQ3OUT
|
||||
G10=`grep -w "devgroup=~\/\[1-1\]" $INFLUXDBTESTQ3OUT| awk '{print $5}'`
|
||||
totalG10=`echo "scale=4; $totalG10 + $G10" | bc`
|
||||
G20=`grep -w "devgroup=~\/\[1-2\]" $INFLUXDBTESTQ3OUT| awk '{print $5}'`
|
||||
totalG20=`echo "scale=4; $totalG20 + $G20" | bc`
|
||||
G30=`grep -w "devgroup=~\/\[1-3\]" $INFLUXDBTESTQ3OUT| awk '{print $5}'`
|
||||
totalG30=`echo "scale=4; $totalG30 + $G30" | bc`
|
||||
G40=`grep -w "devgroup=~\/\[1-4\]" $INFLUXDBTESTQ3OUT| awk '{print $5}'`
|
||||
totalG40=`echo "scale=4; $totalG40 + $G40" | bc`
|
||||
G50=`grep -w "devgroup=~\/\[1-5\]" $INFLUXDBTESTQ3OUT| awk '{print $5}'`
|
||||
totalG50=`echo "scale=4; $totalG50 + $G50" | bc`
|
||||
G60=`grep -w "devgroup=~\/\[1-6\]" $INFLUXDBTESTQ3OUT| awk '{print $5}'`
|
||||
totalG60=`echo "scale=4; $totalG60 + $G60" | bc`
|
||||
G70=`grep -w "devgroup=~\/\[1-7\]" $INFLUXDBTESTQ3OUT| awk '{print $5}'`
|
||||
totalG70=`echo "scale=4; $totalG70 + $G70" | bc`
|
||||
G80=`grep -w "devgroup=~\/\[1-8\]" $INFLUXDBTESTQ3OUT| awk '{print $5}'`
|
||||
totalG80=`echo "scale=4; $totalG80 + $G80" | bc`
|
||||
G90=`grep -w "devgroup=~\/\[1-9\]" $INFLUXDBTESTQ3OUT| awk '{print $5}'`
|
||||
totalG90=`echo "scale=4; $totalG90 + $G90" | bc`
|
||||
G100=`grep -w "devices group by devgroup;" $INFLUXDBTESTQ3OUT| awk '{print $5}'`
|
||||
totalG100=`echo "scale=4; $totalG100 + $G100" | bc`
|
||||
done
|
||||
avgG10=`echo "scale=4; x = $totalG10 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG20=`echo "scale=4; x = $totalG20 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG30=`echo "scale=4; x = $totalG30 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG40=`echo "scale=4; x = $totalG40 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG50=`echo "scale=4; x = $totalG50 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG60=`echo "scale=4; x = $totalG60 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG70=`echo "scale=4; x = $totalG70 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG80=`echo "scale=4; x = $totalG80 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG90=`echo "scale=4; x = $totalG90 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG100=`echo "scale=4; x = $totalG100 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
echo "Latency, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%"
|
||||
echo "InfluxDB, $avgG10, $avgG20, $avgG30, $avgG40, $avgG50, $avgG60, $avgG70, $avgG80, $avgG90, $avgG100"
|
||||
}
|
||||
|
||||
################ Main ################
|
||||
|
||||
verbose=false
|
||||
|
||||
for arg in "$@"
|
||||
do
|
||||
case $arg in
|
||||
-v)
|
||||
verbose=true
|
||||
shift ;;
|
||||
|
||||
-c)
|
||||
clients=$2
|
||||
shift 2;;
|
||||
|
||||
-n)
|
||||
NUM_LOOP=$2
|
||||
shift 2;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
WORK_DIR=/mnt/root/TDengine
|
||||
INFLUXDBTEST_DIR=$WORK_DIR/tests/comparisonTest/influxdb
|
||||
|
||||
runTest
|
||||
|
||||
printTo "Test done!"
|
|
@ -0,0 +1,101 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
DATA_DIR=/mnt/root/testdata
|
||||
NUM_LOOP=5
|
||||
|
||||
function printTo {
|
||||
if $verbose ; then
|
||||
echo $1
|
||||
fi
|
||||
}
|
||||
|
||||
INFLUXDBTESTQ4OUT=influxdbTestQ4.out
|
||||
|
||||
function runTest {
|
||||
totalG10=0
|
||||
totalG20=0
|
||||
totalG30=0
|
||||
totalG40=0
|
||||
totalG50=0
|
||||
totalG60=0
|
||||
totalG70=0
|
||||
totalG80=0
|
||||
totalG90=0
|
||||
totalG100=0
|
||||
for i in `seq 1 $NUM_LOOP`; do
|
||||
printTo "loop i:$i, $INFLUXDBTEST_DIR/influxdbTest \
|
||||
-sql $INFLUXDBTEST_DIR/q4.txt"
|
||||
|
||||
$INFLUXDBTEST_DIR/influxdbTest \
|
||||
-sql $INFLUXDBTEST_DIR/q4.txt 2>&1 |
|
||||
tee $INFLUXDBTESTQ4OUT
|
||||
G10=`grep -w "devgroup=~\/\[1-1\]" $INFLUXDBTESTQ4OUT| awk '{print $5}'`
|
||||
totalG10=`echo "scale=4; $totalG10 + $G10" | bc`
|
||||
G20=`grep -w "devgroup=~\/\[1-2\]" $INFLUXDBTESTQ4OUT| awk '{print $5}'`
|
||||
totalG20=`echo "scale=4; $totalG20 + $G20" | bc`
|
||||
G30=`grep -w "devgroup=~\/\[1-3\]" $INFLUXDBTESTQ4OUT| awk '{print $5}'`
|
||||
totalG30=`echo "scale=4; $totalG30 + $G30" | bc`
|
||||
G40=`grep -w "devgroup=~\/\[1-4\]" $INFLUXDBTESTQ4OUT| awk '{print $5}'`
|
||||
totalG40=`echo "scale=4; $totalG40 + $G40" | bc`
|
||||
G50=`grep -w "devgroup=~\/\[1-5\]" $INFLUXDBTESTQ4OUT| awk '{print $5}'`
|
||||
totalG50=`echo "scale=4; $totalG50 + $G50" | bc`
|
||||
G60=`grep -w "devgroup=~\/\[1-6\]" $INFLUXDBTESTQ4OUT| awk '{print $5}'`
|
||||
totalG60=`echo "scale=4; $totalG60 + $G60" | bc`
|
||||
G70=`grep -w "devgroup=~\/\[1-7\]" $INFLUXDBTESTQ4OUT| awk '{print $5}'`
|
||||
totalG70=`echo "scale=4; $totalG70 + $G70" | bc`
|
||||
G80=`grep -w "devgroup=~\/\[1-8\]" $INFLUXDBTESTQ4OUT| awk '{print $5}'`
|
||||
totalG80=`echo "scale=4; $totalG80 + $G80" | bc`
|
||||
G90=`grep -w "devgroup=~\/\[1-9\]" $INFLUXDBTESTQ4OUT| awk '{print $5}'`
|
||||
totalG90=`echo "scale=4; $totalG90 + $G90" | bc`
|
||||
G100=`grep -w "devices group by time" $INFLUXDBTESTQ4OUT| awk '{print $5}'`
|
||||
totalG100=`echo "scale=4; $totalG100 + $G100" | bc`
|
||||
done
|
||||
avgG10=`echo "scale=4; x = $totalG10 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG20=`echo "scale=4; x = $totalG20 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG30=`echo "scale=4; x = $totalG30 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG40=`echo "scale=4; x = $totalG40 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG50=`echo "scale=4; x = $totalG50 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG60=`echo "scale=4; x = $totalG60 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG70=`echo "scale=4; x = $totalG70 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG80=`echo "scale=4; x = $totalG80 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG90=`echo "scale=4; x = $totalG90 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
avgG100=`echo "scale=4; x = $totalG100 / $NUM_LOOP; if(x<1) print 0; x" | bc`
|
||||
echo "Latency, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, 100%"
|
||||
echo "OpenINFLUXDB, $avgG10, $avgG20, $avgG30, $avgG40, $avgG50, $avgG60, $avgG70, $avgG80, $avgG90, $avgG100"
|
||||
}
|
||||
|
||||
################ Main ################
|
||||
|
||||
verbose=false
|
||||
regeneratedata=false
|
||||
|
||||
for arg in "$@"
|
||||
do
|
||||
case $arg in
|
||||
-v)
|
||||
verbose=true
|
||||
shift ;;
|
||||
|
||||
-c)
|
||||
clients=$2
|
||||
shift 2;;
|
||||
|
||||
-r)
|
||||
regeneratedata=true
|
||||
;;
|
||||
|
||||
-n)
|
||||
NUM_LOOP=$2
|
||||
shift 2;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
WORK_DIR=/mnt/root/TDengine
|
||||
INFLUXDBTEST_DIR=$WORK_DIR/tests/comparisonTest/influxdb
|
||||
|
||||
runTest
|
||||
|
||||
printTo "Test done!"
|
|
@ -4,7 +4,7 @@ DATA_DIR=/mnt/root/testdata
|
|||
NUM_LOOP=1
|
||||
NUM_OF_FILES=100
|
||||
|
||||
rowsPerRequest=(1 100 500 1000 2000)
|
||||
rowsPerRequest=(1 100 1000 10000 20000 50000 100000)
|
||||
|
||||
function printTo {
|
||||
if $verbose ; then
|
||||
|
@ -13,21 +13,26 @@ function printTo {
|
|||
}
|
||||
|
||||
function runTest {
|
||||
printf "R/R, "
|
||||
for c in `seq 1 $clients`; do
|
||||
if [ "$c" == "1" ]; then
|
||||
printf "$c client, "
|
||||
else
|
||||
printf "$c clients, "
|
||||
fi
|
||||
done
|
||||
printf "\n"
|
||||
declare -A avgRPR
|
||||
|
||||
for r in ${!rowsPerRequest[@]}; do
|
||||
for c in `seq 1 $clients`; do
|
||||
avgRPR[$r, $c]=0
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
for r in ${!rowsPerRequest[@]}; do
|
||||
if [ "$r" == "1" ] || [ "$r" == "100" ] || [ "$r" == "1000" ]; then
|
||||
NUM_OF_FILES=$clients
|
||||
else
|
||||
NUM_OF_FILES=100
|
||||
fi
|
||||
|
||||
for r in ${rowsPerRequest[@]}; do
|
||||
printf "$r, "
|
||||
for c in `seq 1 $clients`; do
|
||||
totalRPR=0
|
||||
OUTPUT_FILE=influxdbTestWrite-RPR$r-clients$c.out
|
||||
OUTPUT_FILE=influxdbTestWrite-RPR${rowsPerRequest[$r]}-clients$c.out
|
||||
for i in `seq 1 $NUM_LOOP`; do
|
||||
printTo "loop i:$i, $INF_TEST_DIR/influxdbTest \
|
||||
-dataDir $DATA_DIR \
|
||||
|
@ -39,13 +44,30 @@ function runTest {
|
|||
-numOfFiles $NUM_OF_FILES \
|
||||
-writeClients $c \
|
||||
-rowsPerRequest $r 2>&1 \
|
||||
| tee $OUTPUT_FILE
|
||||
| tee $OUTPUT_FILE
|
||||
RPR=`cat $OUTPUT_FILE | grep speed | awk '{print $(NF-1)}'`
|
||||
totalRPR=`echo "scale=4; $totalRPR + $RPR" | bc`
|
||||
printTo "rows:$r, clients:$c, i:$i RPR:$RPR"
|
||||
done
|
||||
avgRPR=`echo "scale=4; $totalRPR / $NUM_LOOP" | bc`
|
||||
printf "$avgRPR, "
|
||||
avgRPR[$r,$c]=`echo "scale=4; $totalRPR / $NUM_LOOP" | bc`
|
||||
printTo "r:$r c:$c avgRPR:${avgRPR[$r, $c]}"
|
||||
done
|
||||
done
|
||||
|
||||
printf "R/R, "
|
||||
for c in `seq 1 $clients`; do
|
||||
if [ "$c" == "1" ]; then
|
||||
printf "$c client, "
|
||||
else
|
||||
printf "$c clients, "
|
||||
fi
|
||||
done
|
||||
printf "\n"
|
||||
|
||||
for r in ${!rowsPerRequest[@]}; do
|
||||
printf "${rowsPerRequest[$r]}, "
|
||||
for c in `seq 1 $clients`; do
|
||||
printf "${avgRPR[$r,$c]}, "
|
||||
done
|
||||
printf "\n"
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue