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

*: record query start time to session variables #11822

Merged
merged 6 commits into from
Aug 22, 2019

Conversation

zz-jason
Copy link
Member

@zz-jason zz-jason commented Aug 22, 2019

Signed-off-by: Zhang Jian [email protected]

What problem does this PR solve?

move the following 3 metrics from StatementContext to SessionVars:

  • StartTime time.Time
  • DurationParse time.Duration
  • DurationCompile time.Duration

StatementContext will be reset when the physical plan is executed. All the metrics are reset.

What is changed and how it works?

As described above.

Check List

Tests

  • Unit Test
  • Manual test (add detailed scripts or steps below)

Code changes

  • Has exported function/method change
  • Has exported variable/fields change

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note

@zz-jason zz-jason added type/bugfix This PR fixes a bug. sig/execution SIG execution labels Aug 22, 2019
@zz-jason zz-jason requested review from jackysp and lysu August 22, 2019 02:37
@codecov
Copy link

codecov bot commented Aug 22, 2019

Codecov Report

Merging #11822 into master will increase coverage by 0.0194%.
The diff coverage is 94.7368%.

@@               Coverage Diff                @@
##             master     #11822        +/-   ##
================================================
+ Coverage   81.4658%   81.4853%   +0.0195%     
================================================
  Files           435        435                
  Lines         93854      93753       -101     
================================================
- Hits          76459      76395        -64     
+ Misses        11911      11883        -28     
+ Partials       5484       5475         -9

@codecov
Copy link

codecov bot commented Aug 22, 2019

Codecov Report

Merging #11822 into master will decrease coverage by 0.628%.
The diff coverage is 94.7368%.

@@               Coverage Diff               @@
##             master     #11822       +/-   ##
===============================================
- Coverage   82.0784%   81.4504%   -0.628%     
===============================================
  Files           435        435               
  Lines         96459      94126     -2333     
===============================================
- Hits          79172      76666     -2506     
- Misses        11807      11959      +152     
- Partials       5480       5501       +21

@zz-jason zz-jason requested review from qw4990 and SunRunAway August 22, 2019 03:56
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

Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

LGTM

@qw4990 qw4990 added status/LGT2 Indicates that a PR has LGTM 2. status/can-merge Indicates a PR has been approved by a committer. labels Aug 22, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Aug 22, 2019

/run-all-tests

@sre-bot sre-bot merged commit 396b094 into pingcap:master Aug 22, 2019
@zz-jason zz-jason deleted the dev/refine-query-start-time branch August 22, 2019 13:48
@sre-bot
Copy link
Contributor

sre-bot commented Aug 24, 2019

cherry pick to release-3.0 failed

@lysu
Copy link
Contributor

lysu commented Sep 2, 2019

@zz-jason do we need cherry-pick this to 2.1? it seems I will fix another problem related to slow log too :D

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

Successfully merging this pull request may close these issues.

5 participants