-
Notifications
You must be signed in to change notification settings - Fork 48
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
fix: network connectivity speed #360
base: main
Are you sure you want to change the base?
Conversation
I switched branches and submitted. |
@@ -92,6 +94,7 @@ func NewCmdCheck() *cobra.Command { | |||
flags.StringVar(&o.Port, "port", "8889", "Port used by floater.") | |||
flags.IntVarP(&o.PodWaitTime, "pod-wait-time", "w", 30, "Time for wait pod(floater) launch.") | |||
flags.StringVar(&o.Protocol, "protocol", string(TCP), "Protocol for the network problem.") | |||
flags.IntVarP(&o.routinesMaxNum, "routines-max-number", "", 5, "Number of goroutines to use.") |
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 seems to be a feasible method. Can a single test provide more detailed loss output?
Considering that excessive goroutines may cause a certain burden on the native network, if routines-max-number is set to 100 or more, how much traffic will the floater consume?
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 will try it
efc8fc9
to
4d8e043
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rxy0210 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
370a01d
to
37e07f9
Compare
pkg/kosmosctl/floater/check.go
Outdated
// ToDo RunRange && RunNative func support multiple commands, and the code needs to be optimized | ||
cmdObj := &command.Ping{ | ||
TargetIP: targetIP, | ||
goroutinePool <- 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.
use struct{}{} instead 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.
ok, i have fixed it
37e07f9
to
62955f2
Compare
pkg/kosmosctl/floater/check.go
Outdated
routineIPodInfo := iPodInfo | ||
routineJPodInfo := jPodInfo | ||
routineIp := ip | ||
go func() { |
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.
We can definite a func to extract the logic. like go XXXX()
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 fixed it
62955f2
to
e9da94d
Compare
Signed-off-by: renxiangyu <[email protected]>
e9da94d
to
4b34d56
Compare
/lgtm |
What type of PR is this?
/kind bug
What does this PR do?
Improves the speed of checking network connectivity
Which issue(s) does this PR fix?
Fixes #238
Special notes for your reviewer:
Does this PR introduce a user-facing change?