File: http_distributed.xml.in

package info (click to toggle)
tsung 1.8.0-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,932 kB
  • sloc: erlang: 25,486; javascript: 10,347; sh: 3,109; perl: 1,025; makefile: 624; python: 372
file content (149 lines) | stat: -rw-r--r-- 6,383 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "@prefix@/share/@PACKAGE_NAME@/@DTD@">
<!-- set dumptraffic="true" to dump all received and sent packets -->
<!-- set loglevel="debug" for maximum verbosity -->
<tsung loglevel="notice" dumptraffic="false" version="1.0">

  <!-- Client side setup -->
  <clients>
    <!-- maxusers is the max number of simultaneous clients. Don't set
    it too high because you can run out of file descriptors. Remember
    that ssl_esock use 2 fds by connection. -->

    <client host="myhost" weight="2" maxusers="500">
      <!-- Several virtual IP can be used to simulate more
      machines. Very useful when a load-balancer use the client's IP to
      distribute the traffic among a cluster of servers-->
      <ip value="192.168.2.223"></ip> 
      <ip value="192.168.2.224"></ip> 
    </client>

    <!-- a second machine is used, with a higher weight, and 2 cpus
    (erlang is not SMP aware, so we starts 2 beams to use all the
    CPUs -->
    <client host="myhost2" weight="3" maxusers="250" cpu="2">
      <ip value="192.168.2.225"></ip>
    </client>

    <!-- If you have a single machine to do the tests, you may add
    this attribute to the client tag: use_controller_vm="true" . This
    will run the virtual users on the same Virtual Machine as the
    controller. Useful if you have problems with starting up remote
    beam -->

  </clients>
  
  <!-- Server side setup -->
<servers>
  <server host="myserver" port="80" type="tcp"/>
</servers>

  <!-- to start os monitoring (cpu, network, memory). Use an erlang
  agent on the remote machine or SNMP. erlang is the default --> 
  <monitoring>
    <monitor host="myserver" type="snmp"></monitor>
    <monitor host="myhost" type="erlang"></monitor>
  </monitoring>
  
  <!-- several arrival phases can be set: for each phase, you can set
  the mean inter-arrival time between new clients and the phase
  duration -->
 <load>
  <arrivalphase phase="1" duration="1" unit="hour">
    <users interarrival="2" unit="second"></users>
  </arrivalphase>
  <arrivalphase phase="2" duration="1" unit="hour">
    <users interarrival="1" unit="second"></users>
  </arrivalphase>
 </load>

  <!--  Options. -->
  <options> 
  <!-- Thinktime value overrides those set in the session
  nodes if override=true. -->
  <option name="thinktime" value="3" random="true" override="false"></option>

  <!-- to set specific ssl_ciphers -->
  <!--   <default name="ssl_ciphers" value="EXP1024-RC4-SHA,EDH-RSA-DES-CBC3-SHA"></default> -->

  <option name="tcp_rcv_buffer"  value="4096"></option>
  <option name="tcp_snd_buffer"  value="4096"></option>

  <!-- To start ts_file_server. It can be use later in dynamic
  substitution using ts_file_server:get_next_line() --> 
 <option name="file_server"  value="./src/test/test_file_server.csv"></option>

  <!-- HTTP parameters -->
  
  <!-- If you want to benchmark a proxy server instead of a regular web server-->
<!--   <default type="ts_http" name="http_use_server_as_proxy" value="true"/> -->

   <option type="ts_http" name="user_agent">
    <user_agent probability="80">Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Galeon/1.3.21</user_agent>
    <user_agent probability="20">Mozilla/5.0 (Windows; U; Windows NT 5.2; fr-FR; rv:1.7.8) Gecko/20050511 Firefox/1.0.4</user_agent>
   </option>
  </options> 

  <!-- ********************************************** -->
  <!-- start a session for a http user. the popularity is the
  frequency of this type os session. The sum of all session's
  popularity must be 100 -->
  <!-- ********************************************** -->
 <sessions>
  <session name="http-example" probability="30" type="ts_http">
    <!-- full url with server name, this overrides the "server" config value -->
    <request> <http url="http://linuxit02/" method="GET" version="1.1"></http> </request>
    <!-- when if_modified_since is defined, it send a GET with If-modified since: Date header -->
    <!-- relative URL, use the latest server config -->
    <request> <http url="/images/accueil2/home-txtdeclar-2.gif" method="GET" version="1.1" if_modified_since="Fri, 14 Nov 2003 02:43:31 GMT"></http> </request>

    <thinktime value="20" random="true"></thinktime>
    
    <!--  after a thinktime, a new page begins. -->
    <!--  start a transaction. This is used to have custom response time statistics -->
    <transaction name="index_request">
    <request> <http url="/index.en.html" method="GET" version="1.1" ></http> </request>

      <!-- Example of a dynamic request (subst=true); %%symbol:new%%
      will be parsed and the result of symbol:new(Pid) will be put
      instead in the request (at run time) -->
      <request subst="true">
        <http url='http://localhost:8080/axis/servlet/AxisServlet' version='1.0' content_type='text/xml; charset=utf-8' method='POST' 
          contents='&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 &lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt; &lt;SOAP-ENV:Body&gt;
 &lt;echo:Echo xmlns:echo="EchoService"&gt;
 &lt;symbol&gt;%%symbol:new%%&lt;/symbol&gt;
 &lt;/echo:Echo&gt;
 &lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;'>
          <soap action='EchoService'></soap>
        </http>
      </request>

  </transaction>

    <!-- wait during 60 seconds -->
      <thinktime value="60" random="true"></thinktime>

      <request> <http url="/" method="POST" version="1.1" contents="bla=blu"></http> </request>

    <!-- GET request with Basic authentication -->
      <request> <http url="/bla" method="GET" version="1.1" contents="bla=blu&amp;name=glop">
          <www_authenticate userid="Aladdin" passwd="open sesame"/>
        </http>
      </request>
  </session>


  <session name="http-example" probability="30" type="ts_http">

    <request> <http url="/" method="GET" version="1.1"></http> </request>
    <request> <http url="/images/icon1.gif" method="GET" version="1.1" if_modified_since="Fri, 14 Nov 2003 02:43:31 GMT"></http> </request>
    <request> <http url="/images/icon1.gif" method="GET" version="1.1"></http> </request>

    <thinktime value="60" random="true"></thinktime>

    <request> <http url="/" method="GET" version="1.1"  if_modified_since="Fri, 14 Nov 2003 02:43:31 GMT"></http> </request>

  </session>
 </sessions>
</tsung>