docs(todo): lock-free load-mode instrumentation profile - #63
Conversation
…-21) Keeps closure's thesis — measurement boundary in play while throughput scales — by splitting instrumentation by what concurrency allows in LOAD mode: drop the DD-005/DD-010 serialization lock (real concurrency), keep concurrency-safe per-request latency + 5xx/crash, and replace per-request heap/thread deltas (which need the lock) with periodic global sampling for drift (the #59 sampler already does this). Load mode gets realistic throughput + latency/5xx + heap-thread drift, losing only per-request heap attribution (explore mode's job). Proven-needed by the 2026-07-21 benchmark (k6 10-VU 256ms was the valve serializing, not app throughput). Composes with clustered runners + cost-pheromone corpus into a distributed cost-guided load engine. Design-note first; likely its own DD. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXSdVrJQy6DvELDbtptG5p
|
@claude please review this docs-only roadmap addition: check the technical claim is sound (latency/5xx are concurrency-safe without the lock; heap/thread deltas need serialization; drift-via-sampling is the load-relevant substitute) and that the DD-005/DD-010/DD-026/#59 cross-references are accurate. |
|
Claude finished @ianp94's task in 4m 5s —— View job Review: lock-free load-mode instrumentation profile
Core thesis checks out. Two claims are overstated relative to what's actually built today, worth fixing before this becomes a DD:
Net assessment: the split-by-concurrency-tolerance design is technically sound and well-grounded in the existing DDs — dropping the lock for real throughput while keeping context-scoped latency and moving heap/thread to periodic absolute sampling is the right shape. Just tighten the two references above (5xx/crash as new work; point the "already does this" claim at No code changes made — this was a review-only request on a docs-only PR. |
Two technical corrections the review caught: (1) 5xx/crash detection is NEW work in load mode, not a 'keep' — LoadRun.fire() currently swallows exceptions and ignores status codes. (2) The drift-sampling primitive is absolute Runtime.totalMemory()-freeMemory() reads (which LoadRun already does, lock-free/process-global), NOT the #59 sampler's heap columns — those come from ctx.heapDeltaBytes, the same lock-dependent per-iteration delta, so resampling it coarsely doesn't make it concurrency-safe. #59 contributes the timer/CSV cadence, not the heap value. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXSdVrJQy6DvELDbtptG5p
|
Both corrections applied — good catches, they'd have mattered when this graduates to a DD. (1) 5xx/crash reframed as ADD (LoadRun.fire swallows exceptions today). (2) The drift primitive now correctly points at LoadRun's absolute Runtime.totalMemory()-freeMemory() read (lock-free/process-global) rather than the #59 sampler's heap columns — which, as you note, are the lock-dependent ctx.heapDeltaBytes delta just resampled coarsely. #59's contribution is reframed as the timer/CSV cadence, not the heap value; the periodic+target-side sampler is the greenfield work. |
Captures the idea you green-lit (2026-07-21): keep instrumentation in play while scaling throughput — closure's thesis applied to load testing.
The problem, proven by the benchmark: load mode drives an Injected target whose valve serializes requests (DD-005/DD-010, so per-request heap/thread deltas are attributable) — which caps concurrency at 1. The k6 10-VU run showing 256ms was 10× queueing behind the lock, not app throughput. Naively uninstrumenting to go fast discards the whole availability oracle → load mode becomes plain k6.
The fix — split instrumentation by what concurrency allows, in load mode only:
Composes with clustered runners (#62) and the cost-pheromone corpus (#60) into a distributed cost-guided load engine. Cross-refs DD-005/DD-010, DD-026, the sampler. Design-note-first; likely its own DD. Docs-only.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LXSdVrJQy6DvELDbtptG5p