OpenSRP load testing uses the tool Tsung.
Tsung is a heavy duty, load-testing tool that is used to benchmark the performance of servers and applications.
The main main advantage of Tsung is
More feature of Tsung are on http://tsung.readthedocs.io/en/latest/features.html
Install Erlang and depencies sudo apt-get install erlang gnuplot libtemplate-perl
Install Tsung
wget http://tsung.erlang-projects.org/dist/tsung-1.7.0.tar.gz
tar zxvf tsung-1.7.0.tar.gz
cd tsung-1.7.0
./configure
make
make install
Verify installation
Check the version of tsung installed on your system.
tsung -v
On MacOS install Tsung using Homebrew. brew install tsung
To be able to extract reports also install cpan templates by using sudo cpan Template
Tsung needs you configure an xml that has defines the configuration. The XML file has the test cases, load definition, application, server or database being tested.
Refer to the documentation on http://tsung.erlang-projects.org/user_manual/configuration.html for understanding on how to configure the Tsung configuration.
Use the command below to execute the load tests
tsung -f opensrp.xml start
You can get the opensrp configuration file from https://github.com/OpenSRP/opensrp-scripts/blob/master/load-testing/opensrp.xml
The repositories has other configuration file
Use the Tsung reporting tool to extract statistics and metrics from the the load tests
Go to log directory. This usually output from the terminal when running the load test
cd ~/.tsung/log/20180503-1847/
Generate graphical Report:
/usr/lib/tsung/bin/tsung_stats.pl
Open report in Firefox browser:
firefox report.html