-
-
Save joujiahe/9931310 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE tsung SYSTEM "/home/ngocdaothanh/opt/tsung-ws-plugin/share/tsung/tsung-1.0.dtd"> | |
<tsung loglevel="notice" version="1.0"> | |
<clients> | |
<!-- Can't be IP --> | |
<client host="localhost" cpu="8"/> | |
<client host="t2" cpu="8"/> | |
<!-- | |
<client host="t3" cpu="8"/> | |
<client host="t4" cpu="8"/> | |
<client host="t5" cpu="8"/> | |
<client host="t6" cpu="8"/> | |
<client host="t7" cpu="8"/> | |
<client host="t8" cpu="8"/> | |
<client host="t9" cpu="8"/> | |
<client host="t10" cpu="8"/> | |
--> | |
</clients> | |
<servers> | |
<server host="my_website" port="80" type="tcp"/> | |
</servers> | |
<load> | |
<arrivalphase phase="1" duration="5" unit="minute"> | |
<users arrivalrate="200" unit="second"></users> | |
</arrivalphase> | |
</load> | |
<sessions> | |
<session probability="100" name="ws" type="ts_websocket"> | |
<request><websocket type="connect" url="/ws/1"/></request> | |
<request><websocket type="send">sec</websocket></request> | |
<setdynvars sourcetype="random_number" start="5" end="10"><var name="tt"/></setdynvars> | |
<thinktime value="%%_tt%%"></thinktime> | |
<request><websocket type="send" ack="no_ack">play,0</websocket></request> | |
<for from="1" to="20" incr="1" var="count1"> | |
<setdynvars sourcetype="random_number" start="5" end="15"><var name="tt"/></setdynvars> | |
<setdynvars sourcetype="random_number" start="1" end="10"><var name="h_count"/></setdynvars> | |
<thinktime value="%%_tt%%"></thinktime> | |
<for from="1" to="%%_h_count%%" incr="1" var="count2"> | |
<request><websocket type="send" ack="no_ack">h,0,101</websocket></request> | |
</for> | |
</for> | |
<request><websocket type="close"/></request> | |
</session> | |
</sessions> | |
</tsung> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment