Нагрузочное тестирование с помощью Tsung

На Linux Ubuntu 14.04 лучше не устанавливать через apt-get. А лучше скачать отюсда (http://tsung.erlang-projects.org/dist/) и установить deb пакет.

tsung -f myconfigfile.xml start

Создает в каком-то каталоге каталог такого характера:

~/.tsung/log/20040217-0940

Внутри этой папки выполняем следующее для генерации отчета.

/usr/lib/tsung/bin/tsung_stats.pl

 <!--?xml version="1.0"?-->
<tsung loglevel="info">
<clients>
<client host="localhost" maxusers="10000" use_controller_vm="true">
</client></clients>

<servers>
<server host="studentshare.net" port="80" type="tcp"></server>
</servers>

<load duration="1" unit="hour">
<arrivalphase duration="2" phase="1" unit="minute">
<users interarrival="32" unit="second"></users>
</arrivalphase>
<arrivalphase duration="2" phase="2" unit="minute">
<users interarrival="16" unit="second"></users>
</arrivalphase>
<arrivalphase duration="2" phase="3" unit="minute">
<users interarrival="8" unit="second"></users>
</arrivalphase>
<arrivalphase duration="2" phase="4" unit="minute">
<users interarrival="4" unit="second"></users>
</arrivalphase>
<arrivalphase duration="2" phase="5" unit="minute">
<users interarrival="2" unit="second"></users>
</arrivalphase>

<arrivalphase duration="2" phase="6" unit="minute">
<users arrivalrate="1" unit="second"></users>
</arrivalphase>
<arrivalphase duration="2" phase="7" unit="minute">
<users arrivalrate="2" unit="second"></users>
</arrivalphase>
<arrivalphase duration="2" phase="8" unit="minute">
<users arrivalrate="4" unit="second"></users>
</arrivalphase>
<arrivalphase duration="2" phase="9" unit="minute">
<users arrivalrate="8" unit="second"></users>
</arrivalphase>
<arrivalphase duration="2" phase="10" unit="minute">
<users arrivalrate="16" unit="second"></users>
</arrivalphase>
<arrivalphase duration="2" phase="11" unit="minute">
<users arrivalrate="32" unit="second"></users>
</arrivalphase>
<arrivalphase duration="2" phase="12" unit="minute">
<users arrivalrate="64" unit="second"></users>
</arrivalphase>
</load>
<sessions>
<session name="normal_user1" probability="100" type="ts_http">
<request><http method="GET" url="/" version="1.1"></http></request>
<thinktime random="true" value="7">
<request><http method="GET" url="/14-business/" version="1.1"></http></request>
<thinktime random="true" value="7">
<request><http method="GET" url="/118-business-essay/" version="1.1"></http></request>
<thinktime random="true" value="7">
<request><http method="GET" url="/business-essay/539959-management-information-systems-business-company-system/" version="1.1"></http></request>
</thinktime></thinktime></thinktime></session>
</sessions>
</tsung>

Сссылки:

http://tsung.erlang-projects.org/user_manual/conf-load.html
http://evtuhovich.ru/blog/2014/04/02/tsung/
http://habrahabr.ru/post/132459/
http://profyclub.ru/docs/252
http://tsung.readthedocs.org/en/latest/conf-load.html

комментарии (0)