.. index:: session .. _sessions-label: ======== Sessions ======== Sessions define the content of the scenario itself. They describe the requests to execute. Each session has a given probability. This is used to decide which session a new user will execute. The sum of all session's probabilities must be 100. **Since Tsung 1.5.0**, you can use weights instead of probabilities. In the following example, there will be twice as many sessions of type s1 than s2. .. code-block:: xml A transaction is just a way to have customized statistics. Say if you want to know the response time of the login page of your website, you just have to put all the requests of this page (HTML + embedded pictures) within a transaction. In the example above, the transaction called ``index_request`` will gives you in the statistics/reports the mean response time to get ``index.en.html + header.gif``. Be warn that If you have a thinktime inside the transaction, the thinktime will be part of the response time. .. index:: thinktimes Thinktimes ^^^^^^^^^^ You can set static or random thinktimes to separate requests. By default, a random thinktime will be a exponential distribution with mean equals to ``value``. .. code-block:: xml In this case, the thinktime will be an exponential distribution with a mean equals to 20 seconds. **Since version 1.3.0**, you can also use a range ``[min:max]`` instead of a mean for random thinktimes (the distribution will be uniform in the interval): .. code-block:: xml **Since version 1.4.0**, you can use a dynamic variable to set the thinktime value: .. code-block:: xml You can also synchronize all users using the ``wait_global`` value: .. code-block:: xml which means: wait for all (N) users to be connected and waiting for the global lock (the value can be set using the option ``