File: jabber_node.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 (91 lines) | stat: -rw-r--r-- 3,573 bytes parent folder | download | duplicates (3)
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
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "@prefix@/share/@PACKAGE_NAME@/@DTD@">
<tsung loglevel="debug" version="1.0">

  <!-- Client side setup -->
  <clients>
    <client host="localhost" use_controller_vm="true"></client>
  </clients>

  <!-- Server side setup -->
 <servers>
  <server host="localhost" port="5222" type="tcp"></server>
 </servers>

 <!-- Define the traffic pattern of the users coming in -->
  <load>
    <user session="create_node" start_time="0" unit="minute"></user>
    <arrivalphase phase="2" duration="1" unit="minute">
      <users interarrival="2" unit="second"></users>
    </arrivalphase>
  </load>

  <!-- JABBER parameters -->
  <!-- to synchronise users,  use a global acknoledgement -->
 <options>
   <option type="ts_jabber" name="pubsub_service" value="pubsub.localhost"/>
   <option type="ts_jabber" name="global_number" value="100"></option>
   <option type="ts_jabber" name="userid_max" value="1"></option>
   <option type="ts_jabber" name="domain" value="localhost"></option>
   <option type="ts_jabber" name="username" value="user"></option>
   <option type="ts_jabber" name="passwd" value="pass"></option>
 </options>

 <sessions>
   <!-- Create nodes -->
   <session probability='0' name="create_node" type="ts_jabber">
     <request> <jabber type="connect" ack="local"/> </request>
     <thinktime value="2" random="true"/>
     <request> <jabber type="auth_sasl" ack="local"/> </request>
     <thinktime value="2" random="true"/>
     <request> <jabber type="connect" ack="local"></jabber> </request>
     <thinktime value="2" random="true"/>
     <request> <jabber type="auth_sasl_bind" ack="local" ></jabber></request>
     <thinktime value="2" random="true"/>
     <request> <jabber type="auth_sasl_session" ack="local" ></jabber></request>
     <thinktime value="5" random="true"/>

     <!-- Create the node -->
     <request subst="true">
       <jabber type='pubsub:create' ack="local" node="/test" node_type="flat"
         data="[{'pubsub#access_model','open'},
                {'pubsub#deliver_payloads','1'},
                {'pubsub#notify_retract', '0'},
                {'pubsub#persist_items', '0'},
                {'pubsub#max_items', '0'},
                {'pubsub#send_last_published_item', 'never'},
                {'pubsub#publish_model', 'open'}]."/>
     </request>

     <request> <jabber type="close" ack="local"></jabber> </request>
   </session>

   <session bidi="true" probability="100" name="sasl" type="ts_jabber">
     <thinktime value="15"/>
     <request> <jabber type="connect" ack="local"/> </request>
     <thinktime value="2" random="true"/>
     <request> <jabber type="auth_sasl" ack="local"/> </request>
     <thinktime value="2" random="true"/>
     <request> <jabber type="connect" ack="local"></jabber> </request>
     <thinktime value="2" random="true"/>
     <request> <jabber type="auth_sasl_bind" ack="local" ></jabber></request>
     <thinktime value="2" random="true"/>
     <request> <jabber type="auth_sasl_session" ack="local" ></jabber></request>
     <request> <jabber type="presence:initial" ack="no_ack"/> </request>
     <thinktime value="5" random="true"/>

     <request>
       <jabber type='pubsub:subscribe' ack="local" node="/test"/>
     </request>

     <for from="1" to="10" var="i">
       <thinktime value="5" random="true"/>
       <request>
         <jabber type='pubsub:publish' size='9' ack="local" node="/test"/>
       </request>
     </for>

     <request> <jabber type="close" ack="local"></jabber> </request>
   </session>
 </sessions>
</tsung>