Вопрос

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