forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FB8-46: Port v5.1 Extra Stats: Command Timers (facebook#989) (faceboo…
…k#989) Summary: Jira issue: https://jira.percona.com/browse/FB8-46 Reference Patch: facebook@f2d6fdc With additional improvements: 1. Variables moved from global to session from facebook@459f669 2. Added time tracking for "sp_instr_stmt::exec_core", "mysql_open_cursor", "Execute_sql_statement::execute_server_code" and "Prepared_statement::execute" from facebook@4554e16 Adds command, slave_command, pre-exec, parse, and execution timers. This ports these timers from v5.1 to 5.6, using the new timers. I also added an mtr test to confirm they are at least partly working. Originally Reviewed By: chip Pull Request resolved: facebook#989 Differential Revision: D14883715 Pulled By: yizhang82
- Loading branch information
Showing
21 changed files
with
145 additions
and
24 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
flush status; | ||
select sleep(1.1); | ||
sleep(1.1) | ||
0 | ||
include/assert.inc [Parse_seconds should be smaller than a second.] | ||
include/assert.inc [Pre_exec_seconds should be smaller than a second.] | ||
include/assert.inc [Exec_seconds should be bigger than a second.] | ||
include/assert.inc [Command_seconds should be bigger than a second.] |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#Set all to zero | ||
flush status; | ||
|
||
#Start counters | ||
--let $start_parse = query_get_value(show status like "Parse_seconds", Value, 1) | ||
--let $start_pre_exec = query_get_value(show status like "Pre_exec_seconds", Value, 1) | ||
--let $start_exec = query_get_value(show status like "Exec_seconds", Value, 1) | ||
--let $start_command = query_get_value(show status like "Command_seconds", Value, 1) | ||
|
||
#Waste ~1.1 seconds | ||
select sleep(1.1); | ||
|
||
#Get counters | ||
--let $end_parse = query_get_value(show status like "Parse_seconds", Value, 1) | ||
--let $end_pre_exec = query_get_value(show status like "Pre_exec_seconds", Value, 1) | ||
--let $end_exec = query_get_value(show status like "Exec_seconds", Value, 1) | ||
--let $end_command = query_get_value(show status like "Command_seconds", Value, 1) | ||
|
||
#Check sanity | ||
--let $assert_text= Parse_seconds should be smaller than a second. | ||
--let $assert_cond= $end_parse - $start_parse < 1.0 | ||
--source include/assert.inc | ||
|
||
--let $assert_text= Pre_exec_seconds should be smaller than a second. | ||
--let $assert_cond= $end_pre_exec - $start_pre_exec < 1.0 | ||
--source include/assert.inc | ||
|
||
--let $assert_text= Exec_seconds should be bigger than a second. | ||
--let $assert_cond= $end_exec - $start_exec > 1.0 | ||
--source include/assert.inc | ||
|
||
--let $assert_text= Command_seconds should be bigger than a second. | ||
--let $assert_cond= $end_command - $start_command > 1.0 | ||
--source include/assert.inc |
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
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
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
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
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
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
Oops, something went wrong.