-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
fix(scheduler): remove the defer function cost #82330
fix(scheduler): remove the defer function cost #82330
Conversation
/assign @Huang-Wei @ahg-g |
@@ -409,6 +409,7 @@ func benchmarkScheduling(numNodes, numExistingPods, minPods int, | |||
// Since the total amount of time is relatively large, it might not be a concern. | |||
time.Sleep(100 * time.Millisecond) | |||
} | |||
b.StopTimer() |
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. Let's put a comment explaining that without this line we're taking the overhead of defer()
into account.
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 @draveness
Agree with @Huang-Wei . For readability, it is necessary to note why this line was added :)
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.
done, PTAL
8168c6b
to
4105fea
Compare
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.
👍 @draveness
/lgtm
/approve
/lgtm |
/retest |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: draveness, Huang-Wei, SataQiu 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 |
/kind bug
/sig scheduling
/priority important-longterm
What this PR does / why we need it:
Remove the cost of the defer function in the scheduler perf test.
Without StopTimer
With StopTimer
Which issue(s) this PR fixes:
ref: #81719
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: