Skip to content

Fix per-thread throughput when EStats are disabled - #32

Closed
Muhammad Labeeb Aryan bin Mohd Lokman (Labeeb2339) wants to merge 1 commit into
microsoft:mainfrom
Labeeb2339:codex/fix-per-thread-throughput
Closed

Fix per-thread throughput when EStats are disabled#32
Muhammad Labeeb Aryan bin Mohd Lokman (Labeeb2339) wants to merge 1 commit into
microsoft:mainfrom
Labeeb2339:codex/fix-per-thread-throughput

Conversation

@Labeeb2339

Fixes #24

Cause

In v5.40, worker start/end timestamps were captured only inside the tcp_row block. tcp_row is created only for successful TCP EStats setup, so normal runs without -es left per-thread worker time at zero even though per-thread byte counters and totals were populated.

Change

  • Capture worker start/end timestamps independently of optional EStats collection in both synchronous and asynchronous worker paths.
  • Keep EStats calls and availability gated by a valid tcp_row.
  • Leave per-thread byte accounting, totals, and throughput measurement formulas unchanged.

Validation

  • Added tests/test_per_thread_throughput.ps1, a dependency-free regression guard for both worker paths, and wired it into the Windows build workflow.
  • Regression checks pass locally.
  • Built Release x64 locally with the available Visual Studio toolchain (using UndockedSourceLink=false, UndockedUseDriverToolset=false, and SpectreMitigation=false because those local components are unavailable).
  • Ran rebuilt v5.40 sender/receiver loopback tests without -es in synchronous and asynchronous modes; both reported non-zero per-thread time/throughput and non-zero totals.

Related upstream work exists in #31; this change keeps the fix scoped to the issue and preserves existing EStats behavior.

@Labeeb2339 Muhammad Labeeb Aryan bin Mohd Lokman (Labeeb2339) closed this by deleting the head repository Aug 31, 2026
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.

per-thread throughput is always 0.00 with ntttcp version 5.40.

1 participant