سؤال

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