-
Notifications
You must be signed in to change notification settings - Fork 729
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
statistics: reduce unnecessary copy when collect hot metrics #5709
Conversation
Signed-off-by: lhy1024 <[email protected]>
[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. |
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
Codecov ReportBase: 75.65% // Head: 75.70% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5709 +/- ##
==========================================
+ Coverage 75.65% 75.70% +0.05%
==========================================
Files 329 329
Lines 32689 32707 +18
==========================================
+ Hits 24730 24761 +31
+ Misses 5817 5814 -3
+ Partials 2142 2132 -10
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Is there any benchmark to show the improvement? |
As shown in the picture in the description of pr, the memory of clone will be saved when collecting monitoring information, and in the new version of the test, the relevant flame graph will not be seen. |
peerLoadSum[j] += peer.GetLoad(j) | ||
} | ||
} | ||
ret[id] = &HotPeersStat{ |
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.
Will it miss some info compared with before?
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.
It doesn't contain store info and hot peers detail, but metrics only use the total data of hot peers.
Signed-off-by: lhy1024 <[email protected]>
PTAL @HunDunDM |
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
peers := filterHotPeers(kind, hotPeers) | ||
for _, peer := range peers { | ||
for j := range peerLoadSum { | ||
peerLoadSum[j] += peer.GetLoad(j) |
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.
In summaryStoresLoadByEngine
, it seems use peer.Loads[i]
but not peer.GetLoad(j)
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.
peer.Loads[i]
return instant data. peer.GetLoad(i)
return denoising data, which is better.
Signed-off-by: lhy1024 <[email protected]>
389bbbd
to
5acb0d0
Compare
/merge |
@lhy1024: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests 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. |
This pull request has been accepted and is ready to merge. Commit hash: 5acb0d0
|
@lhy1024: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests 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. |
Signed-off-by: lhy1024 [email protected]
What problem does this PR solve?
Issue Number: Ref #5692


Before:
After:
What is changed and how does it work?
Check List
Tests
Release note