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
Add more visibility to IP address resolution when using DNS #556
Conversation
Code Climate has analyzed commit db3d86e and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## master #556 +/- ##
========================================
- Coverage 87.5% 87.5% -0.0%
========================================
Files 26 26
Lines 3579 3602 +23
========================================
+ Hits 3130 3150 +20
- Misses 300 302 +2
- Partials 149 150 +1
Continue to review full report at Codecov.
|
@ldemailly Do you have any other questions about this PR? If not can we merge this? Thanks. |
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.
nice! just 1 important and 1 optional change
// Sort the ip address form largest to smallest based on its usage count | ||
ipList := make([]string, 0, len(total.IPCountMap)) | ||
for k := range total.IPCountMap { | ||
ipList = append(ipList, k) |
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's somewhat minor but you should be able to get that list in the above loop; like keys
- though maybe it's easier/as clear as you have it now; given we don't expect hundreds of ips anyway
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.
thx
Add logs at the end of the test to show the IP address each thread resolve to when using DNS and the usage count of each IP address.
Sample run result: