-
Notifications
You must be signed in to change notification settings - Fork 191
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
cleanup: clean up TCP calls and use netip #179
Conversation
@@ -33,4 +33,4 @@ jobs: | |||
run: go build -v ./... | |||
|
|||
- name: Test | |||
run: go test -v -race -benchmem -bench=. ./... -benchtime=100ms |
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.
By removing -v, we only see the output for failures, which is more helpful
@@ -149,6 +149,7 @@ func BenchmarkCloseTCP(b *testing.B) { | |||
duration := time.Minute | |||
b.ResetTimer() | |||
for i := 0; i < b.N; i++ { | |||
ssMetrics.AddAuthenticatedTCPConnection(addr, accessKey) |
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.
Without this we get a ton of warnings.
@@ -107,7 +108,7 @@ func startUDPEchoServer(t testing.TB) (*net.UDPConn, *sync.WaitGroup) { | |||
t.Logf("Failed to read from UDP conn: %v", err) | |||
return | |||
} | |||
conn.WriteTo(buf[:n], clientAddr) | |||
_, err = conn.WriteTo(buf[:n], clientAddr) |
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.
Bug fix
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.
These are cursory cleanups while I'm figuring out the code for Websockets.