Configuring Tsung
Tsung comes with an example configuration file for doing distributed HTTP testing, which you’ll find in /usr/share/doc/tsung/examples/http_distributed.xml. We will create our own configuration file, saved to ~/http_distributed_couch_proxy.xml (see the Tsung User’s manual at http://tsung.erlang-projects.org/user_manual.html):
Warning
The location of the DTD file, /usr/share/tsung/tsung-1.0.dtd, may be different on your testing client. If so, this value will need to be modified to match the location on your client.
<?xml version="1.0"?> <!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd"> <tsung loglevel="notice" version="1.0"> <!-- Client side setup --> <clients> <client host="test-a" weight="1" maxusers="10000" cpu="4"/> <client host="test-b" weight="1" maxusers="10000" cpu="4"/> </clients> <!-- Server side setup --> <servers> <server host="couch-proxy" port="80" type="tcp"/> </servers> <!-- Load setup --> <load> <arrivalphase phase="1" duration="5" unit="minute"> <users arrivalrate="200" unit="second"></users> </arrivalphase> </load> <!-- Sessions setup --> <sessions> <session name="post_get" probability="2.5" type="ts_http"> <thinktime value="10" random="true"/> <setdynvars sourcetype="random_number" start="2008" end="2011"> <var name="yyyy"/> </setdynvars> <setdynvars sourcetype="random_number" start="10" end="12"> <var name="mm"/> </setdynvars> <setdynvars sourcetype="random_number" start="10" end="28"> <var name="dd"/> </setdynvars> <request subst="true"> ...
Get Scaling CouchDB now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.