Skip to content

fix(tune): add configurable timeout - #30

Open
YIKUAIBANZI wants to merge 1 commit into
pgrundev:mainfrom
YIKUAIBANZI:fix/tune-timeout
Open

fix(tune): add configurable timeout#30
YIKUAIBANZI wants to merge 1 commit into
pgrundev:mainfrom
YIKUAIBANZI:fix/tune-timeout

Conversation

@YIKUAIBANZI

Copy link
Copy Markdown

Summary

  • add tune --timeout with the same 30-second default and Go duration syntax used by the other collection commands
  • apply the selected budget to both the command context and collect.Options.Deadline
  • cover the CLI behavior with a real stalled TCP connection and protect the gather-to-collector deadline mapping

Why

tune hard-coded a 30-second command context and did not register a timeout flag. In addition, gather did not forward inspectFlags.timeout, so the collector could still apply its shorter fallback deadline even if the outer command budget was increased.

The first commit in #28 independently contains the shared gather deadline forwarding. This focused fix includes that necessary mapping because tune --timeout values above the collector fallback would otherwise remain ineffective; if #28 lands first, the overlapping line can be dropped during rebase.

Verification

  • go test ./... -count=1
  • go test -race ./... -count=1
  • go vet ./...
  • golangci-lint v2.12.2 run ./...
  • scripts/gate.sh (isolated committed HEAD; Linux/macOS on amd64/arm64)

govulncheck ./... also ran, but the local Go 1.26.3 standard library reports advisories fixed in later Go patch releases; this change adds no dependencies.

Fixes #26

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.

Provide --timeout for tune

1 participant