Skip to content

Instantly share code, notes, and snippets.

@lefred
Created March 1, 2016 13:13
Show Gist options
  • Save lefred/f83a19f757f777c98c8c to your computer and use it in GitHub Desktop.
Save lefred/f83a19f757f777c98c8c to your computer and use it in GitHub Desktop.
SELECT ROUND(SUM(trx)/60) AS transactions_per_second FROM
(SELECT VARIABLE_VALUE * -1 AS trx
FROM information_schema.GLOBAL_STATUS
WHERE VARIABLE_NAME = 'wsrep_last_committed'
UNION ALL SELECT sleep(60) AS trx
UNION ALL SELECT VARIABLE_VALUE AS trx
FROM information_schema.GLOBAL_STATUS
WHERE VARIABLE_NAME = 'wsrep_last_committed') AS COUNTED;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment