TPS-Transactions Per Second (number of Transactions processed Per Second) refers to the number of Transactions processed by the server Per Second. the storage engine that supports Transactions, such as InnoDB, has a unique performance indicator.
Calculation method:
TPS = (COM_COMMIT + COM_ROLLBACK)/UPTIME
Use information_schema; select VARIABLE_VALUE into @ num_com from GLOBAL_STATUS where VARIABLE_NAME = 'com _ COMMIT '; select VARIABLE_VALUE into @ num_roll from GLOBAL_STATUS where VARIABLE_NAME = 'com _ ROLLBACK '; select VARIABLE_VALUE into @ uptime from GLOBAL_STATUS where VARIABLE_NAME = 'uptime'; select (@ num_com + @ num_roll)/@ UPTIME;
QPS-Queries Per Second (Queries Per Second) is applicable to both InnoDB and MyISAM engines
Calculation method:
QPS = QUESTIONS/UPTIME
Use information_schema; select VARIABLE_VALUE into @ num_queries from GLOBAL_STATUS where VARIABLE_NAME = 'questions'; select VARIABLE_VALUE into @ uptime from GLOBAL_STATUS where VARIABLE_NAME = 'uptime'; select @ num_queries/@ UPTIME;