-
Notifications
You must be signed in to change notification settings - Fork 725
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
*: optimize memory usage #8164
*: optimize memory usage #8164
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
b697eed
to
91fbb40
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8164 +/- ##
==========================================
- Coverage 77.42% 77.28% -0.14%
==========================================
Files 471 470 -1
Lines 61405 61334 -71
==========================================
- Hits 47540 47400 -140
- Misses 10308 10358 +50
- Partials 3557 3576 +19
Flags with carried forward coverage won't be shown. Click here to find out more. |
pkg/utils/grpcutil/grpcutil.go
Outdated
} | ||
if t, ok := md[ForwardMetadataKey]; ok { | ||
return t[0] | ||
s := metadata.ValueFromIncomingContext(ctx, ForwardMetadataKey) |
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.
Do we need to change other FromIncomingContext
?
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.
I prefer not for now since it's still in experimental state.
pkg/ratelimit/runner.go
Outdated
@@ -197,7 +202,7 @@ func (cr *ConcurrentRunner) RunTask(ctx context.Context, f func(context.Context) | |||
} | |||
task.submittedAt = time.Now() | |||
cr.pendingTasks = append(cr.pendingTasks, task) | |||
cr.pendingTaskCount[taskOpts.TaskName]++ |
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.
Is taskName
a required field? If so, should it be in the task
struct?
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[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.
lgtm
// Reset timer after setup | ||
b.ResetTimer() | ||
// Run HandleStatsAsync b.N times | ||
for i := 0; i < b.N; i++ { | ||
cluster.HandleStatsAsync(c, region) | ||
} | ||
} | ||
|
||
func BenchmarkHandleRegionHeartbeat(b *testing.B) { |
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.
maybe we can run some benchmarks daily.
Signed-off-by: Ryan Leung <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: HuSharp, nolouch 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:
|
/merge |
@rleungx: We have migrated to builtin 👉 Please use
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. |
@rleungx: 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 #7897
What is changed and how does it work?
Check List
Tests
compared with beb91c1
Release note