Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ca5a5330b8
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 119 lines (107 sloc) 4.227 kb
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
%%%
%%% Copyright © IDEALX S.A.S. 2003
%%%
%%% Author : Nicolas Niclausse <nicolas.niclausse@niclux.org>
%%% Created: 03 Dec 2003 by Nicolas Niclausse <nicolas.niclausse@niclux.org>
%%%
%%% This program is free software; you can redistribute it and/or modify
%%% it under the terms of the GNU General Public License as published by
%%% the Free Software Foundation; either version 2 of the License, or
%%% (at your option) any later version.
%%%
%%% This program is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%%% GNU General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with this program; if not, write to the Free Software
%%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
%%%
%%% In addition, as a special exception, you have the permission to
%%% link the code of this program with any library released under
%%% the EPL license and distribute linked combinations including
%%% the two.


-vc('$Id$ ').
-author('nicolas.niclausse@niclux.org').

-include("ts_macros.hrl").

-define(TSUNGPATH, "TSUNGPATH").
-define(SESSION_POP_ERROR_MSG, "Total sum of session popularity is not equal to 100").

-define(DEF_REGEXP_DYNVAR_BEGIN, "name=(\"|')").%'
-define(DEF_REGEXP_DYNVAR_END, "(\"|') ([^>]* )?value=(\"|')\\([^(\"|')]*\\)(\"|')").%'

-define(DEF_RE_DYNVAR_BEGIN, "name=[\"']").%'
-define(DEF_RE_DYNVAR_END, "[\"'] (?:[^>]* )?value=[\"']([^\"']*)[\"']").%'

-record(config, {
          name,
          duration, % max duration of test (by default: end when all clients are done)
          loglevel = ?WARN,
          dump = none,
          stats_backend,
          controller, % controller machine
          clients = [], % client machines
          servers = [], % server(s) to test
          ports_range, % client ports range
          monitor_hosts = [], % Cluster host to monitor (for CPU, MEM usage)
          arrivalphases = [], % arrival process specs
          thinktime, % default thinktime specs
          subst = false, % Substitution should be applied on the request
          match, % Match regexp in response
          dynvar = [],
          main_sess_type , % main type of session
          sessions = [],
          static_users=[],
          session_tab,
          use_controller_vm = false, % if true, start the first launcher in the
                                     % same vm as the controller if possible
          curthink, % temporary var (current request think)
          curid = 0, % temporary var (current request id (can be transaction))
          cur_req_id = 0, % temporary var (current real request id)
          file_server = [], % filenames for file_server
          load_loop, % loop phases if > 0
          hibernate = 10000, % hibernate timeout (millisec) 10sec by default
          proto_opts, % tcp/udp buffer sizes
          seed = now, % random seed: (default= current time)
          vhost_file = none, % file server user for virtual host jabber testing
          user_server_maxuid = none, % user_id max
          oids=[],
          rate_limit,
          total_popularity = 0, % should be 100 if we use probabilites; sum of all weights if we use weights
          use_weights , % true if we use weights instead of probabilities
          job_notify_port
         }).


-record(client,
        {host,
         weight = 1,
         maxusers,
         ip = []
        }).

-record(server,
        {host,
         port,
         type
        }).
-record(session,
        { id,
          popularity,
          type,
          name,
          persistent = false,
          bidi = false,
          hibernate,
          proto_opts,
          rate_limit,
          size,
          client_ip,
          server,
          userid,
          seed,
          dump
        }).

-record(arrivalphase,
        {phase,
         duration,
         unit,
         intensity,
         maxnumber,
         curnumber = 0
        }).
Something went wrong with that request. Please try again.