Skip to content

fix(loadtest): measure parent-side wall in the multiprocess sweep#97

Merged
JumpTechCode merged 1 commit into
mainfrom
fix/loadtest-mp-throughput
Jun 22, 2026
Merged

fix(loadtest): measure parent-side wall in the multiprocess sweep#97
JumpTechCode merged 1 commit into
mainfrom
fix/loadtest-mp-throughput

Conversation

@JumpTechCode

Copy link
Copy Markdown
Collaborator

Summary

The multi-process fan-out (loadtest.multiprocess.multiprocess_sweep) gathered each slice's CommandSamples but called summarize("guarded-mp", samples, wall_seconds=0.0), so the reported throughput was always 0.0 (count/wall collapses to 0.0 when wall is non-positive). Correctness signals — oversell, retries, latencies, and the oracle verdict — were already meaningful; only throughput was degenerate.

This threads a real aggregate wall through the sweep: it times the parent-side wall around the ProcessPoolExecutor run (from dispatch until the last slice returns) and passes it to summarize, mirroring how the single-process drive() reports its wall.

Why parent-side wall

The parent-side span is the correct denominator for an aggregate throughput across overlapping workers — summing per-slice walls would double-count concurrent time. The comparative table's published throughput/p99 numbers still come from the single-process run; this is the multi-process path's own end-to-end figure.

Test

TDD: extended test_multiprocess_guarded_stays_clean with assert report.metrics.throughput > 0.0. Confirmed it fails first (assert 0.0 > 0.0, with count=48 and valid latencies), then passes after the fix. Full make verify is green (591 passed, 99.14% coverage; ruff, mypy --strict, import-linter, pip-audit clean).

Closes #96.

🤖 Generated with Claude Code

The multi-process fan-out gathered each slice's samples but called
summarize(..., wall_seconds=0.0), so the reported throughput was always
0.0 (count/wall collapses to 0.0 when wall is non-positive). Latencies,
retries, oversell, and the oracle verdict were already meaningful; only
throughput was degenerate.

Time the parent-side wall around the ProcessPoolExecutor run — from
dispatch until the last slice returns — and pass it to summarize, mirroring
how the single-process drive() reports its wall. The parent-side span is
the correct denominator for an aggregate throughput across overlapping
workers; summing per-slice walls would double-count concurrent time. The
comparative table's published numbers still come from the single-process
run.

Closes #96.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@JumpTechCode
JumpTechCode merged commit 42255d8 into main Jun 22, 2026
7 checks passed
@JumpTechCode
JumpTechCode deleted the fix/loadtest-mp-throughput branch June 22, 2026 14:43
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.

loadtest: multiprocess sweep reports throughput=0.0 (post-hoc wall not threaded through)

1 participant