Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e19c265
test(h2client): failing tests for #85, #86, #88 and #89
FumingPower3925 Sep 26, 2026
381b8be
fix(h2client): record the status the response HEADERS carry (#85)
FumingPower3925 Sep 26, 2026
5113c3c
fix(h2client): count every DATA frame of a response body (#86)
FumingPower3925 Sep 26, 2026
83d5ccb
fix(h2client): no lifetime deadline on an HTTP/2 connection (#88)
FumingPower3925 Sep 26, 2026
7ab43f9
fix(h2client): redial a connection that dies without a GOAWAY (#89)
FumingPower3925 Sep 26, 2026
1abbd1c
fix(h2client): a response that arrives before the connection closes i…
FumingPower3925 Sep 26, 2026
72a8ac1
test(h2client): failing tests for the round-1 review of #91
FumingPower3925 Sep 27, 2026
b34dc85
fix(h2client): the body flow-control wait returns window credit and s…
FumingPower3925 Sep 27, 2026
ec23f41
fix(h2client): a connection out of stream IDs is redialed, not failed…
FumingPower3925 Sep 27, 2026
cda3d4b
fix(h2client): redial a connection that served at once, as h1client d…
FumingPower3925 Sep 27, 2026
260e24d
fix(h2client): a response is a success only when its :status says so …
FumingPower3925 Sep 27, 2026
5893503
test(h2client): failing test for a stream whose slot a later stream t…
FumingPower3925 Sep 27, 2026
b659f70
fix(h2client): never give a new stream the slot of one still waiting
FumingPower3925 Sep 27, 2026
5f519b5
test(h2client): failing test for requests the connection never wrote
FumingPower3925 Sep 27, 2026
dbf32fd
fix(h2client): a request the connection never wrote is retried, and a…
FumingPower3925 Sep 27, 2026
d766a18
ci(test): print each test's verdict and allow 300 s for the root package
FumingPower3925 Sep 27, 2026
0cf7afe
test(h2client): failing tests for the round-2 review of #91
FumingPower3925 Sep 27, 2026
a7a4601
fix(h2client): the h2c upgrade's own stream 1 does not mark a connect…
FumingPower3925 Sep 27, 2026
2f361ad
fix(h2client): pace a server that looks down inside the request it fa…
FumingPower3925 Sep 27, 2026
0b1adcd
fix(h2client): a request body stops waiting for window once the serve…
FumingPower3925 Sep 27, 2026
50ae981
fix(h2client): a request queued after the writer's last drain is retr…
FumingPower3925 Sep 27, 2026
5cb2197
fix(h2client): a stream with only an interim status, or HEADERS too s…
FumingPower3925 Sep 27, 2026
81a3f75
test(h2client): failing tests for the round-3 review of #91, and thre…
FumingPower3925 Sep 27, 2026
1133fb8
fix(h2client): the request body stops at the server's RST_STREAM, not…
FumingPower3925 Sep 27, 2026
599d3ca
fix(h2client): a connection out of stream IDs that dies is failed lik…
FumingPower3925 Sep 27, 2026
f2e3eae
fix(h2client): reconnectSlot reads served once readLoop has parsed wh…
FumingPower3925 Sep 27, 2026
111c42d
test(h2client): failing test for two awaits draining one dead connect…
FumingPower3925 Sep 27, 2026
d69d9c3
fix(h2client): an await on a dead connection waits for a request anot…
FumingPower3925 Sep 27, 2026
629c904
test(h2client): failing test for a redial that starts after the run h…
FumingPower3925 Sep 27, 2026
f14208a
fix(h2client): reconnectSlot dials nothing once the run has ended, al…
FumingPower3925 Sep 27, 2026
f9052f6
test(h2client): the GOAWAY test's doc gives the measured range, 10-11…
FumingPower3925 Sep 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
go mod verify
go build ./...
go vet ./...
go test -race -count=1 -timeout 120s ./...
go test -race -count=1 -timeout 300s ./...

publish:
name: Create tag and release
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ empty (`omitempty`).
| `errors` | int64 | Errors during the measurement window. |
| `duration` | duration (ns) | Wall-clock measurement duration (post-warmup). |
| `requests_per_sec` | float64 | `requests / duration.Seconds()`. |
| `throughput_bps` | float64 | Response-body bytes per second. Accurate for H1; the H2 client currently counts only the last DATA frame of each response, so multi-frame H2 bodies are undercounted. |
| `throughput_bps` | float64 | Response-body bytes per second, over successful responses: the Content-Length or the chunk sizes for H1, the data of every DATA frame for H2 (padding excluded, as chunk framing is for H1). |
| `latency` | object | `{avg, min, max, p50, p75, p90, p99, p99_9, p99_99}`, each a duration in ns. |
| `loadgen_version` | string | loadgen build that produced the run. *(optional)* |
| `mode` | string | `"saturation"` or `"rated"`. *(optional)* |
Expand Down
14 changes: 13 additions & 1 deletion backoff.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,25 @@ type connectBackoff struct {
// cancelled or abort is closed, so Close() and run shutdown are never stuck
// behind a sleep. A nil abort channel is valid and never fires.
func (b *connectBackoff) sleep(ctx context.Context, abort <-chan struct{}) bool {
return sleepFor(ctx, abort, b.step())
}

// step returns the current backoff interval, jittered uniformly down to half,
// and doubles the interval for the following call, capped at
// reconnectBackoffMax, without sleeping: a caller that owns the backoff under
// a lock takes the interval there and sleeps it after releasing the lock.
func (b *connectBackoff) step() time.Duration {
d := b.next
if d <= 0 {
d = reconnectBackoffMin
}
b.next = min(d*2, reconnectBackoffMax)
return d/2 + rand.N(d/2+1) // uniform in [d/2, d]
}

d = d/2 + rand.N(d/2+1) // uniform in [d/2, d]
// sleepFor blocks for d. It returns early — reporting false — when ctx is
// cancelled or abort is closed. A nil abort channel is valid and never fires.
func sleepFor(ctx context.Context, abort <-chan struct{}, d time.Duration) bool {
t := time.NewTimer(d)
defer t.Stop()
select {
Expand Down
Loading
Loading