Code Review
/
iec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add a http performance test script based on wrk
[iec.git]
/
src
/
tools
/
test_service_latency.sh
diff --git
a/src/tools/test_service_latency.sh
b/src/tools/test_service_latency.sh
index
b26d6f3
..
fff0ead
100755
(executable)
--- 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
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++))
for (( c=$START; c<=$END; c++))
- do
+ do
curl -w "%{time_total}\n" -o /dev/null -s http://$svcIP
done | jq -s add/length
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 ""
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
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 connect:"
+for (( c=$START; c<=$END; c++))
+do
+ curl -w "%{time_connect}\n" -o /dev/null -s $nodeIP:$nodePort
+done | jq -s add/length