-
Notifications
You must be signed in to change notification settings - Fork 83
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
MGMT-4718 Capture network latency and packet loss at L3 network connectivity #187
MGMT-4718 Capture network latency and packet loss at L3 network connectivity #187
Conversation
8d50ae2
to
02ba00f
Compare
02ba00f
to
c30b1e5
Compare
c30b1e5
to
76a49e9
Compare
/retest |
58f5b4e
to
0a69fcd
Compare
9a82355
to
3ed01a7
Compare
c5225b8
to
be0517a
Compare
@YuviGold please review |
be0517a
to
dfd5212
Compare
dfd5212
to
1499058
Compare
L3Connectivity: []*models.L3Connectivity{}, | ||
} | ||
addresses := getOutgoingAddresses(conCheck.getHost().Nics) | ||
dataCh := make(chan any) |
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.
Why channel with size 1 ?
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.
because there is only 1 routine consuming the data from the channel. Having the channel with a bigger queue won't improve the time it takes for this single routine to process all the information generated by all the other routines.
src/commands/connectivity_check.go
Outdated
allDstMacs = append(allDstMacs, destNic.Mac) | ||
func l2CheckConnectivity(dataCh chan any, conCheck connectivityCmd) { | ||
defer sendDone(dataCh) | ||
doneCh := make(chan any) |
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.
Suggest to have single method to signal the go-routine terminates - either wait-group or done channel.
It is not relevant to channels that the done information is sent along with the data.
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.
ok. I'll refactor this part to use a wait group like in
assisted-installer-agent/src/commands/connectivity_check.go
Lines 123 to 124 in 1499058
wg := sync.WaitGroup{} | |
wg.Add(len(addresses)) |
It will save the need to use this
doneCh
to sync.
1499058
to
1cfbb11
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jordigilh, ori-amizur 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 |
This PR extends the L3 connectivity information gathered by the agent by capturing the average latency (RTT) and the packet loss information per host connection.
Code has been refactored and unit tests extended to cover the new functionality as well as the aggregation process to validate the refactored code.
This PR is the counterpart in the assisted-service.
@pkliczewski @jakub-dzon @machacekondra @masayag @YuviGold please review at your discretion in the meanwhile.
/Jordi