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

metric: add metric for pessimistic lock keys #20383

Merged
merged 2 commits into from
Oct 12, 2020

Conversation

crazycs520
Copy link
Contributor

Signed-off-by: crazycs520 [email protected]

What problem does this PR solve?

As the title said. relate issue: #18942

Here is an example of metric profile:

before

image

You must be weird, why commit statement cost so much time in tidb_execution?

This PR:

image

Now, you will be more clear, because there are some time cost in lock keys, tidb_execution cost is very low.

What is changed and how it works?

Add metrics.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • No code

Side effects

  • No.

Release note

  • No.

Signed-off-by: crazycs520 <[email protected]>
@crazycs520 crazycs520 requested a review from cfzjywxk October 10, 2020 06:31
@crazycs520
Copy link
Contributor Author

@cfzjywxk @tiancaiamao @jackysp PTAL

Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 10, 2020
@cfzjywxk
Copy link
Contributor

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Oct 10, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Oct 10, 2020
@crazycs520
Copy link
Contributor Author

/run-all-tests

@crazycs520 crazycs520 merged commit 9f93efd into pingcap:master Oct 12, 2020
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Oct 19, 2020
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #20513

ti-srebot added a commit that referenced this pull request Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/metrics sig/transaction SIG:Transaction status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants