Skip to content

feat: add --disable-keepalive #112

Merged
11eshaannegi merged 1 commit into
mainfrom
feat/disable-keepalive-flag
Apr 1, 2026
Merged

feat: add --disable-keepalive #112
11eshaannegi merged 1 commit into
mainfrom
feat/disable-keepalive-flag

Conversation

@11eshaannegi
Copy link
Copy Markdown
Contributor

Overview

Adds support for disabling HTTP keep-alive connections in goperf to enable accurate cold-connection latency measurement.

Changes

  • Added --disable-keepalive CLI flag to the run command
  • Updated HTTP transport to use DisableKeepAlives: true when enabled
  • Added support for disable_keepalive in JSON and YAML config files
  • Updated tests to validate flag behavior and transport changes

Why

Keep-alive connections reuse TCP connections, which can hide real-world latency. This feature allows benchmarking with fresh connections for each request.

Testing

  • Verified CLI flag registration
  • Confirmed transport disables keep-alive when flag is set
  • All existing and new tests passing

Usage

goperf run http://example.com --disable-keepalive

@11eshaannegi 11eshaannegi merged commit 88dd98f into main Apr 1, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

🎉 This PR is included in version 1.13.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants