Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS-4790: Improve user statistics accuracy (5.7) #2657

Merged
merged 3 commits into from
Nov 7, 2018
Merged

PS-4790: Improve user statistics accuracy (5.7) #2657

merged 3 commits into from
Nov 7, 2018

Conversation

inikep
Copy link
Collaborator

@inikep inikep commented Nov 5, 2018

Currently userstat measures times for mysql_parse, mysqld_stmt_reset, mysqld_stmt_fetch, mysqld_stmt_prepare, mysqld_stmt_execute.
MariaDB measures times only for mysql_parse and dispatch_command which call above functions.
Moreover MariaDB adds measurements for COM_INIT_DB, COM_REGISTER_SLAVE, COM_RESET_CONNECTION, and other in dispatch_command.
It makes measurements of BUSY_TIME and CPU_TIME more accurate.
This patch implements a similar solution that measures times only for dispatch_command and mysql_parse using newly created sql/userstat.cc and sql/userstat.h.

Currently userstat measures times for mysql_parse, mysqld_stmt_reset, mysqld_stmt_fetch, mysqld_stmt_prepare, mysqld_stmt_execute.
MariaDB measures times only for `mysql_parse` and `dispatch_command` which call above functions.
Moreover MariaDB adds measurements for COM_INIT_DB, COM_REGISTER_SLAVE, COM_RESET_CONNECTION, and other in `dispatch_command`.
It makes measurements of BUSY_TIME and CPU_TIME more accurate.
This patch implements a similar solution that measures times only for `dispatch_command` and `mysql_parse` using newly created `sql/userstat.cc` and `sql/userstat.h`.
@inikep
Copy link
Collaborator Author

inikep commented Nov 5, 2018

@inikep inikep merged commit 3cf418b into percona:5.7 Nov 7, 2018
@inikep inikep deleted the ps5.7-PS-4790 branch November 7, 2018 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants