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
Avoid allocating slice for finding Process #4058
Conversation
Build succeeded.
|
Codecov Report
@@ Coverage Diff @@
## master #4058 +/- ##
==========================================
- Coverage 45.89% 42.53% -3.36%
==========================================
Files 117 130 +13
Lines 11891 14828 +2937
==========================================
+ Hits 5457 6307 +850
- Misses 5516 7602 +2086
- Partials 918 919 +1
Continue to review full report at Codecov.
|
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.
Please sign your commit git commit -s
What's the purpose of this PR? |
@AkihiroSuda This PR does cleanup. |
Build succeeded.
|
Build succeeded.
|
Build succeeded.
|
should be good to rebase now |
Signed-off-by: zyu <yuzhihong@gmail.com>
@crosbymichael |
Build succeeded.
|
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
LGTM |
For checkProcesses(), we obtain slice of Processes via allProcesses() and only use one of them where Pid matches.
allProcesses() is not exported and not used elsewhere in service.go.
This PR replaces allProcesses() by finding Process given Pid inside checkProcesses().