문제

I'd like to write a Linux bash script in order to make a load test on URL responding REST, specifically on time spent. I'd like to run multi wget thread then to eval time spent when ALL threads are terminated. But following sh code doesnt calculate time properly, giving back hand whithout waiting for threads ends. Could you help me ? Thanks.

date > temps
for i in (seq 1 10)
do
   wget -q -header "Content-Type : application/json" -post-file json.txt server &
done
date >> temps
도움이 되었습니까?

해결책

I think you are looking for a benchmark utility. You may try these commands:

ab (Apache Benchmark)
siege

Both have the option for "concurrent connections" and detailed stats.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top