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

resource_control: update static calibrate cpu params #43969

Merged
merged 2 commits into from
May 19, 2023

Conversation

HuSharp
Copy link
Contributor

@HuSharp HuSharp commented May 18, 2023

What problem does this PR solve?

Issue Number: close #44012

Problem Summary:

What is changed and how it works?

  • cpu formula is ms, the previous calculation forgot to multiply by 1000

Check List

Tests

  • Unit test

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: husharp <[email protected]>
@ti-chi-bot
Copy link

ti-chi-bot bot commented May 18, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • glorv
  • nolouch

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 18, 2023
Signed-off-by: husharp <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 18, 2023
@HuSharp
Copy link
Contributor Author

HuSharp commented May 18, 2023

@nolouch @glorv @CabinfeverB PTAL, thx!

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 19, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented May 19, 2023

@CabinfeverB: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@HuSharp
Copy link
Contributor Author

HuSharp commented May 19, 2023

/review default

@ti-chi-bot
Copy link

ti-chi-bot bot commented May 19, 2023

@HuSharp:

Pull Request Review

Title

resource_control: update static calibrate cpu params

Description

The pull request aims to fix the issue referenced in #43212 by updating the static calibrate CPU parameters. The main change is in the conversion from seconds to milliseconds for the CPU value.

Changes

The changes include:

  1. Renaming tidbCPU to tidbToKVCPURatio to reflect the actual purpose of the variable better.
  2. Updated the CPU calculation formula to multiply the base CPU value by 1000 to convert it to milliseconds.
  3. Fixed a minor typo in the comment.
  4. Minor adjustments in test cases to match the updated CPU calculation.

Potential problems

  • The Pull Request itself does not have any major issues.
  • The test cases have been updated to reflect the changes in the calculation, but it would be a good idea to verify if any other test scenarios need to be added for further validation.

Suggestions

No immediate suggestions, as the pull request appears to address the issue described in #43212.

Markdown Summary

- **Title**: resource_control: update static calibrate cpu params
- **Problem**: Inaccurate CPU time unit conversion in resource control static calibration
- **Changes**:
    1. Renamed `tidbCPU` to `tidbToKVCPURatio`
    2. Updated CPU calculation formula to convert seconds to milliseconds
    3. Fixed some minor typographical issues and updated test cases
- **Potential Problems**: None
- **Suggestions**: Verify if additional test cases are necessary for validation.

In response to this:

/review default

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@nolouch nolouch 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
Member

@nolouch nolouch 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-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 19, 2023
@hawkingrei
Copy link
Member

/merge

@ti-chi-bot
Copy link

ti-chi-bot bot commented May 19, 2023

This pull request has been accepted and is ready to merge.

Commit hash: d6d71eb

@ti-chi-bot ti-chi-bot bot added status/can-merge Indicates a PR has been approved by a committer. do-not-merge/needs-triage-completed needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. and removed do-not-merge/needs-triage-completed labels May 19, 2023
@ti-chi-bot ti-chi-bot bot merged commit 6c1e694 into pingcap:master May 19, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #44013.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request May 19, 2023
@HuSharp HuSharp deleted the update_calibrate branch May 19, 2023 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

static Calibrate cpu factor need to be multiplied by 1000
6 participants