-
Notifications
You must be signed in to change notification settings - Fork 720
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
resourcemanager: add more test about assign tokens and comments #8399
Conversation
cc @glorv |
Signed-off-by: nolouch <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8399 +/- ##
==========================================
- Coverage 77.32% 77.23% -0.10%
==========================================
Files 470 471 +1
Lines 61687 61907 +220
==========================================
+ Hits 47701 47814 +113
- Misses 10405 10502 +97
- Partials 3581 3591 +10
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
{15000, 12500, -27500, defaultTrickleDuration}, | ||
{12500, 11250, -28750, defaultTrickleDuration}, | ||
{11250, 10625, -29375, defaultTrickleDuration}, | ||
// PR_PER_SEC is close to 2000, RU_PER_SEC = assignedTokens / TrickleTime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// PR_PER_SEC is close to 2000, RU_PER_SEC = assignedTokens / TrickleTime. | |
// RU_PER_SEC is close to 2000, RU_PER_SEC = assignedTokens / TrickleTime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the unit for TrickleTime?
const defaultTrickleDuration = int64(time.Second) * 5 / int64(time.Millisecond)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default ms
Signed-off-by: nolouch <[email protected]>
Signed-off-by: nolouch <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest lgtm
@@ -144,45 +144,46 @@ func TestGroupTokenBucketRequestLoop(t *testing.T) { | |||
gtb.Tokens = 50000 | |||
|
|||
const timeIncrement = 5 * time.Second | |||
const defaultTrickleDuration = int64(time.Second) * 5 / int64(time.Millisecond) | |||
const targetPeriod = 5 * time.Second | |||
const defaultTrickleMs = int64(targetPeriod) / int64(time.Millisecond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Millisecond
here is meaningless
const defaultTrickleMs = int64(targetPeriod) / int64(time.Millisecond) | |
const defaultTrickleMs = int64(targetPeriod) / int64(1000) |
@okJiang: adding LGTM is restricted to approvers and reviewers in OWNERS files. 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 kubernetes/test-infra repository. |
Signed-off-by: nolouch <[email protected]>
@@ -409,6 +409,11 @@ func (ts *TokenSlot) assignSlotTokens(requiredToken float64, targetPeriodMs uint | |||
// | | |||
// grant_rate 0 ------------------------------------------------------------------------------------ | |||
// loan *** k*period_token (k+k-1)*period_token *** (k+k+1...+1)*period_token | |||
|
|||
// loadCoefficient is relative to the capacity of load RUs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// loadCoefficient is relative to the capacity of load RUs. | |
// loanCoefficient is relative to the capacity of load RUs. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: HuSharp, okJiang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
Signed-off-by: nolouch <[email protected]>
@nolouch: Your PR was out of date, I have automatically updated it for you. If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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. |
What problem does this PR solve?
Issue Number: Ref #4399
What is changed and how does it work?
Check List
Tests
Release note