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: tiny refactor the runtimeStats collection code #10917

Merged
merged 3 commits into from
Jun 24, 2019

Conversation

tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Better code

What is changed and how it works?

Instead of calling if runtimeStats != nil ... check in every executor function,
we can just do it in the executor.Next function.
Remove redundant code and put the check in one place.

Check List

Tests

  • No code

remove redundant code and do it in one place
@tiancaiamao tiancaiamao added type/enhancement The issue or PR belongs to an enhancement. sig/execution SIG execution labels Jun 24, 2019
@tiancaiamao
Copy link
Contributor Author

PTAL @zz-jason @lysu

Copy link
Contributor

@lysu lysu left a comment

Choose a reason for hiding this comment

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

LGTM

@lysu lysu added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 24, 2019
@lysu
Copy link
Contributor

lysu commented Jun 24, 2019

/run-all-tests

@codecov
Copy link

codecov bot commented Jun 24, 2019

Codecov Report

Merging #10917 into master will increase coverage by 0.0431%.
The diff coverage is 100%.

@@               Coverage Diff                @@
##             master     #10917        +/-   ##
================================================
+ Coverage   81.0421%   81.0853%   +0.0431%     
================================================
  Files           419        419                
  Lines         88934      88878        -56     
================================================
- Hits          72074      72067         -7     
+ Misses        11621      11588        -33     
+ Partials       5239       5223        -16

@codecov
Copy link

codecov bot commented Jun 24, 2019

Codecov Report

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

@@             Coverage Diff             @@
##             master     #10917   +/-   ##
===========================================
  Coverage   81.3542%   81.3542%           
===========================================
  Files           419        419           
  Lines         90192      90192           
===========================================
  Hits          73375      73375           
  Misses        11571      11571           
  Partials       5246       5246

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

executor/executor.go Outdated Show resolved Hide resolved
@ngaut ngaut added the status/LGT2 Indicates that a PR has LGTM 2. label Jun 24, 2019
@ngaut ngaut merged commit dc378a2 into pingcap:master Jun 24, 2019
@tiancaiamao tiancaiamao deleted the runtime-stats branch June 24, 2019 06:24
Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/LGT1 Indicates that a PR has LGTM 1. status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants