]> git.8kb.co.uk Git - postgresql/dblt/blob - README.md
test
[postgresql/dblt] / README.md
1 dblt
2 ====
3
4 A C# load testing program for SQL Server or PostgreSQL (using the npgsql data provider).
5
6 Usage
7 -----
8
9 Run parameters are specified in the *App.config* file and the sql transactions
10 to run are read from a separate xml file specified in the *TransactionsFile*
11 parameter.
12
13 App.config parameters
14 ---------------------
15
16 **ServerDescription** (text)             - A description about the test run
17
18 **Mode** (text)                          - mssql for SQL Server, pgsql for PostgreSQL 
19
20 **ConnectionString** (text)              - The sql or npgsql connection string
21
22 **ConnectionRetry** (boolean)            - boolean - Whether or not clients that
23                                            fail to connect should retry (true), 
24                                            or give up (false)
25                                            
26 **ConnectionPerTransaction** (boolean)   - boolean - Whether clients should 
27                                            connect and disconnect for each 
28                                            attempted transaction (true), or keep
29                                            their connection open (false)
30                                            
31 **LogFile** (text)                       - Path to file where verbose details 
32                                            of the test run are logged
33                                            
34 **CsvLogFile** (text)                    - Path to file where statistical results
35                                            of test run are logged
36                                            
37 **LogLevel** (integer)                   - Verbosity level of log data logged into
38                                            the log file specified in the "LogFile" 
39                                            parameter 
40                                            (0 = minimal, 1 = standard, 2 = verbose)
41                                            
42 **VerboseScreen** (boolean)              - Display verbose details of the test 
43                                            to the screen rather than show a summary
44                                            
45 **Clients** (integer)                    - Quantity of clients to use for a single
46                                            test, set to 0 if doing multiple tests.
47                                            
48 **ClientsScale** (integer)               - Set along with "ClientsMax" parameter 
49                                            to run a set of tests with incrementing
50                                            clients
51                                            E.g. ClientsScale = 4 ClientsMax = 16
52                                            will run 4 tests with 4,8,12 and 16 clients
53                                            
54 **ClientsMax** (integer)                - Maximum quantiy of clients to run the test 
55                                           with as detailed above
56                                           
57 **Iterations** (integer)                - Number of iterations for each client 
58                                           to run
59                                           
60 **SleepTime** (integer)                 - Time for each client to sleep between 
61                                           iterations (milliseconds)
62                                           
63 **TransactionsFile** (text)             - Xml file containing the SQL for each  
64                                           iteration of the client - this can contain
65                                           multiple transactions.
66
67 The transactions xml file contains a set of transactions and sql statements to 
68 be executed against the database.  There's nothing overly intelligent about this
69 file, it is simply a <transactions> root node containing *\<transaction>* and *\<sql>* 
70 sub nodes, for which any can have a random attribute assigned to make them be 
71 either run or skipped on a random basis. 
72
73 The text *#client_id#* will also be replaced with the integer id of each client 
74 thread in the testing program; this can be useful for identifying individual
75 clients against queries.
76  
77     <transactions>
78        <transaction random="true">
79          <sql>SELECT 'I am client #client_id#';</sql>
80          <sql>SELECT 2;</sql>
81        </transaction>
82        <transaction>
83          <sql random="true">SELECT 'something';</sql>
84          <sql>SELECT 20;</sql>
85        </transaction>
86     </transactions>
87
88