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

executor: record prepared stmt in handle_query_duration #11753

Merged
merged 4 commits into from
Aug 19, 2019
Merged

executor: record prepared stmt in handle_query_duration #11753

merged 4 commits into from
Aug 19, 2019

Conversation

lysu
Copy link
Contributor

@lysu lysu commented Aug 15, 2019

What problem does this PR solve?

we cannot see duration by sql_type if stmt be run as prepared stmt:

image

What is changed and how it works?

  • save StmtType in Prepared in prepare phase
  • record stmtType(Select/Update/Insert) instead of "Execute" in execute phase

Check List

Tests

  • Manual test

Code changes

  • N/A

Side effects

  • N/A

Related changes

  • Need to cherry-pick to the release branch

This change is Reviewable

@lysu
Copy link
Contributor Author

lysu commented Aug 15, 2019

need merge parser pr pingcap/parser#487 first

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 16, 2019
@cfzjywxk
Copy link
Contributor

LGTM

@tiancaiamao
Copy link
Contributor

pingcap/parser#487 is merged
Would you like to update go.mod, please? @lysu

@codecov
Copy link

codecov bot commented Aug 19, 2019

Codecov Report

Merging #11753 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #11753   +/-   ##
===========================================
  Coverage   81.5409%   81.5409%           
===========================================
  Files           434        434           
  Lines         93683      93683           
===========================================
  Hits          76390      76390           
  Misses        11843      11843           
  Partials       5450       5450

@crazycs520 crazycs520 added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 19, 2019
@lysu
Copy link
Contributor Author

lysu commented Aug 19, 2019

/run-all-tests

Copy link

@imtbkcat imtbkcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@imtbkcat imtbkcat added the status/can-merge Indicates a PR has been approved by a committer. label Aug 19, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Aug 19, 2019

/run-all-tests

@sre-bot sre-bot merged commit bc20369 into pingcap:master Aug 19, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Aug 19, 2019

cherry pick to release-2.1 failed

@sre-bot
Copy link
Contributor

sre-bot commented Aug 19, 2019

cherry pick to release-3.0 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/metrics status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/usability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants