Created
March 1, 2016 13:29
-
-
Save lefred/773159ac450c3588d821 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET GLOBAL wsrep_desync=on; | |
FLUSH TABLES WITH READ LOCK; | |
...wait until the queue rises to be quite high, about 20.000 | |
UNLOCK TABLES; use test; | |
SELECT sum(trx) as transactions, sum(duration) as time, | |
IF(sum(duration) < 5, 'DID NOT TAKE LONG ENOUGH TO BE ACCURATE', | |
ROUND(SUM(trx)/SUM(duration))) | |
AS transactions_per_second | |
FROM | |
(SELECT VARIABLE_VALUE * -1 AS trx, null as duration | |
FROM information_schema.GLOBAL_STATUS | |
WHERE VARIABLE_NAME = 'wsrep_last_committed' | |
UNION ALL | |
SELECT null as trx, galeraWaitUntilEmptyRecvQueue() AS duration | |
UNION ALL | |
SELECT VARIABLE_VALUE AS trx, null as duration | |
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