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