Skip to content

test(origin): add benchmark for number of http connections#622

Draft
sambhav-jain-16 wants to merge 1 commit into
uber:masterfrom
sambhav-jain-16:benchmark-http-conn
Draft

test(origin): add benchmark for number of http connections#622
sambhav-jain-16 wants to merge 1 commit into
uber:masterfrom
sambhav-jain-16:benchmark-http-conn

Conversation

@sambhav-jain-16
Copy link
Copy Markdown
Collaborator

@sambhav-jain-16 sambhav-jain-16 commented May 18, 2026

> go test -tags unit -run '^$' -bench BenchmarkTransferBlob -benchtime=3s ./origin/blobclient/ 2>&1
goos: linux
goarch: amd64
pkg: github.com/uber/kraken/origin/blobclient
cpu: AMD EPYC 7B13
BenchmarkTransferBlob/http_unpooled-96                 1051           3143513 ns/op        1334.27 MB/s             0.0009515 conns/op
BenchmarkTransferBlob/https_unpooled-96                 175          20385623 ns/op         205.75 MB/s             6.000 conns/op
     PASS
     ok         github.com/uber/kraken/origin/blobclient        9.446s

Copilot AI review requested due to automatic review settings May 18, 2026 11:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a Go benchmark in origin/blobclient to quantify how many TCP connections are established per TransferBlob call (server-side Accept() count), comparing HTTP vs HTTPS behavior to surface keep-alive/connection reuse differences.

Changes:

  • Added a benchmark harness for TransferBlob that uploads a fixed-size blob against a local httptest server.
  • Introduced a net.Listener wrapper to count accepted TCP connections and report conns/op as a benchmark metric.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread origin/blobclient/transfer_bench_test.go
Comment thread origin/blobclient/transfer_bench_test.go Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread origin/blobclient/transfer_bench_test.go
Comment thread origin/blobclient/transfer_bench_test.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread origin/blobclient/transfer_bench_test.go
Comment thread origin/blobclient/transfer_bench_test.go
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