X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=src%2Ftools%2Ftest_service_latency.sh;fp=src%2Ftools%2Ftest_service_latency.sh;h=2d200f5565cd1cc190e9e9f14a0c8ee60c26ea79;hb=2030a0294261c8a898f76cb307e056ef71736f1e;hp=b26d6f3d792e3f4585b115b359cd3b5d25f39aa8;hpb=f6bc4ed755c798e2ace22d9b876e39c4393f4200;p=iec.git diff --git a/src/tools/test_service_latency.sh b/src/tools/test_service_latency.sh index b26d6f3..2d200f5 100755 --- a/src/tools/test_service_latency.sh +++ b/src/tools/test_service_latency.sh @@ -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