MXS-1549: Count RO and RW transactions in readwritesplit
Readwritesplit now keeps track of how many read-only and read-write transactions have been executed. This allows a coarse estimation of how widely read-only transactions are done even without explicit read-only transactions being used (i.e. START TRANSACTION READ ONLY).
This commit is contained in:
@ -203,24 +203,14 @@ struct Config
|
||||
*/
|
||||
struct Stats
|
||||
{
|
||||
public:
|
||||
|
||||
Stats():
|
||||
n_sessions(0),
|
||||
n_queries(0),
|
||||
n_master(0),
|
||||
n_slave(0),
|
||||
n_all(0),
|
||||
n_trx_replay(0)
|
||||
{
|
||||
}
|
||||
|
||||
uint64_t n_sessions; /**< Number sessions created */
|
||||
uint64_t n_queries; /**< Number of queries forwarded */
|
||||
uint64_t n_master; /**< Number of stmts sent to master */
|
||||
uint64_t n_slave; /**< Number of stmts sent to slave */
|
||||
uint64_t n_all; /**< Number of stmts sent to all */
|
||||
uint64_t n_trx_replay; /**< Number of replayed transactions */
|
||||
uint64_t n_sessions = 0; /**< Number sessions created */
|
||||
uint64_t n_queries = 0; /**< Number of queries forwarded */
|
||||
uint64_t n_master = 0; /**< Number of stmts sent to master */
|
||||
uint64_t n_slave = 0; /**< Number of stmts sent to slave */
|
||||
uint64_t n_all = 0; /**< Number of stmts sent to all */
|
||||
uint64_t n_trx_replay = 0; /**< Number of replayed transactions */
|
||||
uint64_t n_ro_trx = 0; /**< Read-only transaction count */
|
||||
uint64_t n_rw_trx = 0; /**< Read-write transaction count */
|
||||
};
|
||||
|
||||
class RWSplitSession;
|
||||
|
Reference in New Issue
Block a user