Skip to content
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

dvovk/networkspeedtest #9885

Merged
merged 5 commits into from
Apr 9, 2024
Merged

dvovk/networkspeedtest #9885

merged 5 commits into from
Apr 9, 2024

Conversation

dvovk
Copy link
Member

@dvovk dvovk commented Apr 8, 2024

Implemented a network speed test to run every 180 seconds. This information is crucial for diagnostic tools. It helps us identify if a client is reaching their maximum capacity.

@@ -50,6 +52,7 @@ func (d *DiagnosticClient) Setup() {
d.setupHeadersDiagnostics(rootCtx)
d.setupBodiesDiagnostics(rootCtx)
d.setupResourcesUsageDiagnostics(rootCtx)
d.setupSpeedtestDiagnostics()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
d.setupSpeedtestDiagnostics()
d.setupSpeedtestDiagnostics(rootCtx)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

d.networkSpeedMutex.Lock()
d.networkSpeed = d.runSpeedTest()
d.networkSpeedMutex.Unlock()
case <-quit:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
case <-quit:
case <-ctx.Done():

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"github.com/showwin/speedtest-go/speedtest"
)

func (d *DiagnosticClient) setupSpeedtestDiagnostics() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (d *DiagnosticClient) setupSpeedtestDiagnostics() {
func (d *DiagnosticClient) setupSpeedtestDiagnostics(ctx context.Context) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@dvovk dvovk merged commit 32218d9 into devel Apr 9, 2024
7 checks passed
@dvovk dvovk deleted the dvovk/networkspeedtest branch April 9, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants