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