Revise service test script a little 43/4943/1
authortrevor tao <trevor.tao@arm.com>
Wed, 13 Jul 2022 09:10:33 +0000 (17:10 +0800)
committertrevor tao <trevor.tao@arm.com>
Wed, 13 Jul 2022 09:10:33 +0000 (17:10 +0800)
Signed-off-by: trevor tao <trevor.tao@arm.com>
Change-Id: Ib51aeca537e55a9b0c4e42a75c589aeb4ae877c4

src/tools/test_service_latency.sh

index 2ef5655..b26d6f3 100755 (executable)
@@ -2,6 +2,7 @@ set -e
 
 localIP=$(ip route show default | cut -d " " -f 9)
 echo "localIP:"$localIP
+echo ""
 
 if [ "x${1}" == "x" ]; then
 echo "No node IP defined, uses the local IP instead."
@@ -10,18 +11,12 @@ fi
 nodeIP=$localIP
 aNum=1000
 
-
 display_help () {
   echo "Usage:"
   echo " "
   echo "Please input the nodeIP and access number"
 }
 
-#svcIP=$(kubectl get svc | grep nginx |grep -i "nodeport" | awk -F'[ ]+' '{print $3}')
-#echo "Service IP:"$svcIP
-#nodePort=$(kubectl get svc | grep nginx |grep -i "nodeport" | awk -F'[ ]+' '{print $5}' | cut -d ":" -f 2 |cut -d "/" -f 1)
-#echo "NodePort:"$nodePort
-
 
 ARGS=`getopt -a -o s:n:c:p:k::h:: -l nodeIP:,number:,serviceIP:,nodePort:,nodeOnly::,help:: -- "$@"`
 eval set -- "${ARGS}"
@@ -82,13 +77,10 @@ if [ "x${nodePort}" == "x" ]; then
   echo "NodePort:"$nodePort
 fi
 
-
 accessNum=$((aNum + 0))
-#for i in {1..$(($aNum + 0))} 
 START=1
 END=$aNum
 
-
 if [ "x${nodeOnly}" != "xtrue" ]; then
   echo "Now access the service IP $svcIP:80, $aNum times:"
   for (( c=$START; c<=$END; c++))