Created
August 3, 2016 11:41
-
-
Save tony612/c9a456b3dccbaeae91c4f4ca56d26573 to your computer and use it in GitHub Desktop.
Config for stress test
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 "/usr/local/share/tsung/tsung-1.0.dtd"> | |
| <tsung loglevel="info" version="1.0"> | |
| <clients> | |
| <!-- use localhost, no distribution --> | |
| <client host="localhost" use_controller_vm="true" weight="1" maxusers="60000"/> | |
| </clients> | |
| <servers> | |
| <server host="server.host" port="8080" type="tcp"/> | |
| </servers> | |
| <load> | |
| <arrivalphase phase="1" duration="1000" unit="second"> | |
| <users maxnumber="50000" arrivalrate="1000" unit="second"/> | |
| </arrivalphase> | |
| </load> | |
| <options> | |
| <option name="ports_range" min="1025" max="65535"/> | |
| </options> | |
| <sessions> | |
| <session name="websocket" probability="100" type="ts_websocket"> | |
| <request subst="true"> | |
| <websocket type="connect" path="/guest_socket/websocket?email=user%%ts_user_server:get_unique_id%%@stress.test"/> | |
| </request> | |
| <request subst="true"> | |
| <websocket type="message">{"topic":"event:general:user%%ts_user_server:get_unique_id%%@stress.test", "event":"phx_join", "payload": {}, "ref":"1"}</websocket> | |
| </request> | |
| <for var="i" from="1" to="1000" incr="1"> | |
| <request> | |
| <websocket ack="no_ack" type="message">{"topic":"phoenix","event":"heartbeat","payload":{},"ref":"3"}</websocket> | |
| </request> | |
| <thinktime value="30"/> | |
| </for> | |
| <request> | |
| <websocket type="close"></websocket> | |
| </request> | |
| </session> | |
| </sessions> | |
| </tsung> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment