Skip to content

Instantly share code, notes, and snippets.

@hopewise
Created September 10, 2016 07:19
Show Gist options
  • Save hopewise/8f95ec821bd32487543a9d1ccb559406 to your computer and use it in GitHub Desktop.
Save hopewise/8f95ec821bd32487543a9d1ccb559406 to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/Users/samir/Documents/projects/tsung/tsung-1.0.dtd">
<tsung loglevel="error" version="1.0">
<clients>
<client host="localhost" use_controller_vm="true" maxusers="10000"/>
</clients>
<servers>
<server host="192.168.1.22" port="9907" type="tcp"/>
</servers>
<load>
<arrivalphase phase="1" duration="1" unit="minute">
<users maxnumber="100" interarrival="0.01" unit="second"/>
</arrivalphase>
</load>
<sessions>
<session name="root" probability="100" type="ts_http">
<for from="1" to="2" var="i">
<request>
<http url="/test/counter" method="POST" contents="bla=blu&amp;name=glop">
<http_header name="Authorization" value="Bearer example token"/>
<http_header name="origin" value="http://192.168.1.34/"/>
</http>
</request>
</for>
</session>
</sessions>
</tsung>
#install on mac:
brew install tsung
sudo cpan Template
#run test:
tsung -f example.xml start
#view result,
cd /root/.tsung/log/20141107-1047 (just example)
/usr/local/Cellar/tsung/1.6.0/lib/tsung/bin/tsung_stats.pl
python -m SimpleHTTPServer 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment