Difference between revisions of "Running Tsung against opentaps server"
m (Protected "Running Tsung against opentaps server": Sysop page [edit=sysop:move=sysop]) |
|||
Line 28: | Line 28: | ||
</pre> | </pre> | ||
− | == | + | == Configuration file == |
+ | |||
+ | The configuration file and all the file needed to do a tsung stress testing are available in the directory hot-deploy/opentaps-tests/scripts/tsung/ | ||
+ | |||
+ | * readcsv.erl a small erlang script used to generate the login string from the user and password read | ||
+ | * tsung.xml the configuration file for tsung | ||
+ | * userlist.csv the list of the users which will be used successively to login | ||
+ | |||
+ | === readcsv.erl === | ||
+ | |||
+ | In this file, there is only one function called user. The step done are: | ||
+ | |||
+ | * ts_file_server:get_next_line() to read one line in the file | ||
+ | * string:tokens(Line,";") to separate the user and the password | ||
+ | * "USERNAME=" ++ Username ++"&PASSWORD=" ++ Passwd to return the login string | ||
+ | |||
+ | You have to compile this file | ||
+ | |||
+ | <pre> | ||
+ | $ erlc readcsv.erl | ||
+ | </pre> | ||
+ | |||
+ | You will get a file called readcsv.beam, which you have to copy in the tsung binary directory. In our case it is | ||
+ | |||
+ | <pre> | ||
+ | /usr/lib/erlang/lib/tsung-1.2.0/ebin/ | ||
+ | </pre> | ||
+ | |||
+ | === tsung.xml === | ||
+ | |||
+ | === userlist.csv === | ||
+ | |||
+ | == Graphics generated == |
Revision as of 17:35, 7 March 2008
This is a page to assist with running tsung against opentaps server.
Contents
Installing tsung
- Homepage http://tsung.erlang-projects.org/
- Download page http://tsung.erlang-projects.org/dist/
- Documentation http://tsung.erlang-projects.org/user_manual.html
Tsung needs the erlang platform to be installed. We will not extend over it, because rpm or deb versions just runs fine. http://www.erlang.org/
Tsung is a tool only available for linux platform under binary form. Maybe it could be runned against windows with the erlang windows version and the cygwin platform.
We used Tsung with erlang 5.6.1 The version 1.2.2 has some problem linked to xml parsing, so we prefer the version 1.2.0
You may want to modify tsung-1.2.0/src/tsung_controller/ts_os_mon.erl, depending on which platform you are running the opentaps server. The scripts which do the os monitoring (cpu, memory and network graphs) may not be convenient for your platform.
Compilation
- For debian users, just type fakeroot debian/rules binary.
- For the others a ./configure, make, make install will do it.
To run the client with the configuration file tsung.xml, just have
$ tsung -f tsung.xml start
Configuration file
The configuration file and all the file needed to do a tsung stress testing are available in the directory hot-deploy/opentaps-tests/scripts/tsung/
- readcsv.erl a small erlang script used to generate the login string from the user and password read
- tsung.xml the configuration file for tsung
- userlist.csv the list of the users which will be used successively to login
readcsv.erl
In this file, there is only one function called user. The step done are:
- ts_file_server:get_next_line() to read one line in the file
- string:tokens(Line,";") to separate the user and the password
- "USERNAME=" ++ Username ++"&PASSWORD=" ++ Passwd to return the login string
You have to compile this file
$ erlc readcsv.erl
You will get a file called readcsv.beam, which you have to copy in the tsung binary directory. In our case it is
/usr/lib/erlang/lib/tsung-1.2.0/ebin/