Skip to content

Instantly share code, notes, and snippets.

@okeuday
Last active July 10, 2017 16:05
Show Gist options
  • Save okeuday/b83b5d16775c0d13232fec34223f8f13 to your computer and use it in GitHub Desktop.
Save okeuday/b83b5d16775c0d13232fec34223f8f13 to your computer and use it in GitHub Desktop.
CloudI Erlang http_req integration test Tsung loadtest configuration
<?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="load00" maxusers="30000" use_controller_vm="false">
<ip value="192.168.2.10"/>
</client>
<client host="load01" maxusers="30000">
<ip value="192.168.2.11"/>
</client>
</clients>
<!-- Server side setup -->
<servers>
<server host="business1" port="8080" type="tcp" />
</servers>
<monitoring>
<monitor host="business1" type="erlang" />
</monitoring>
<load duration="35" unit="minute">
<arrivalphase phase="1" duration="10" unit="minute">
<users interarrival="0.0290" unit="second" />
</arrivalphase>
</load>
<sessions>
<session name="Erlang" probability="100" type="ts_http">
<!-- SEQUENCE:
10 minutes ramp-up which attempts 10k req/s on 20k connections
10 minutes of requests
(300 requests with 2 second pauses)
10 minutes (mean) of ramp-down requests
(300 requests with 2 second (mean) pauses)
-->
<setdynvars sourcetype="random_number" start="2" end="1000">
<var name="value"/>
</setdynvars>
<!-- 10 minutes of ramp-up requests -->
<transaction name="ramp_up">
<for from="1" to="300" incr="1" var="index_up">
<request subst="true">
<http url="/tests/http_req/erlang.xml?value=%%_value%%"
method="GET" version="1.1">
</http>
</request>
<thinktime value="2"></thinktime>
</for>
</transaction>
<!-- 10 minutes (mean) of ramp-down requests -->
<transaction name="ramp_down">
<for from="1" to="300" incr="1" var="index_down">
<request subst="true">
<http url="/tests/http_req/erlang.xml?value=%%_value%%"
method="GET" version="1.1">
</http>
</request>
<thinktime value="2" random="true"></thinktime>
</for>
</transaction>
</session>
</sessions>
</tsung>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment