Add time_connect to service latency test script 44/4944/1
authortrevor tao <trevor.tao@arm.com>
Wed, 13 Jul 2022 09:22:01 +0000 (17:22 +0800)
committertrevor tao <trevor.tao@arm.com>
Wed, 13 Jul 2022 09:22:01 +0000 (17:22 +0800)
Signed-off-by: trevor tao <trevor.tao@arm.com>
Change-Id: I8c2c53c41a4fd1cebf7bb223c783c280f90cd708

src/tools/test_service_latency.sh

index b26d6f3..2d200f5 100755 (executable)
@@ -82,16 +82,26 @@ START=1
 END=$aNum
 
 if [ "x${nodeOnly}" != "xtrue" ]; then
-  echo "Now access the service IP $svcIP:80, $aNum times:"
+  echo "Now access the service IP $svcIP:80, $aNum times, time total:"
   for (( c=$START; c<=$END; c++))
-  do 
+  do
     curl -w "%{time_total}\n" -o /dev/null -s http://$svcIP
   done | jq -s add/length
+  echo "Now access the service IP $svcIP:80, $aNum times, time connect:"
+  for (( c=$START; c<=$END; c++))
+  do
+    curl -w "%{time_connect}\n" -o /dev/null -s http://$svcIP
+  done | jq -s add/length
 fi
 
 echo ""
-echo "Now access the $nodeIP:$nodePort, $aNum times"
+echo "Now access the $nodeIP:$nodePort, $aNum times, time total:"
 for (( c=$START; c<=$END; c++))
 do
     curl -w "%{time_total}\n" -o /dev/null -s $nodeIP:$nodePort
 done | jq -s add/length
+echo "Now access the $nodeIP:$nodePort, $aNum times, time total:"
+for (( c=$START; c<=$END; c++))
+do
+    curl -w "%{time_connect}\n" -o /dev/null -s $nodeIP:$nodePort
+done | jq -s add/length