Repository navigation
Queue time in review --max (AGT-4313): a new src/cli/reviewQueueTime.ts starts the httpDispatcher queue-time collector o - #965
Merged
Conversation
…ut (AGT-4313)
- New src/cli/reviewQueueTime.ts.
- beginReviewQueueTimeCapture() starts the httpDispatcher queue-time
collector only when it is not already running. end() freezes the
snapshot and stops the collector only when this capture started it.
- captureQueueTime(fn) stops it in a finally.
- formatQueueTimeLine prints 'Request queue time (undici
create->sendHeaders): p50 X ms, p90 Y ms over N request(s)', or an
explicit n/a line. It never prints 0 ms for a missing measurement.
- runReviewMaxCommand keeps the capture in a local value, never on
AuditRun.
- The capture spans the first reviewer fan-out and its usage-limit
fallback merge.
- It ends in a finally, before history dedupe, CodeQL, --fix, the quality
harness and Linear filing, so their traffic is not counted.
- The line is printed after the fan-out summary and passed to
formatAuditReport, whose optional fourth argument adds a Transport
section.
- The exit code is unchanged, and reviewMaxCommand.tsx shrinks from 1075
to 1071 lines.
- Tests:
- unit tests for the format, the n/a case, collector ownership, an
already-running collector and a throw;
- the Transport section;
- a non-dry-run wiring test against a loopback HTTP/1.1 server (3
fan-out requests counted, 2 harness requests not), which fails when the
wiring is reverted;
- fallback and throw coverage.
Assumption: the figure is the process-wide in-process undici queue time of
the first fan-out. undici 6.x publishes sendHeaders only for HTTP/1.1, so h2
requests are not counted, as the collector already documents.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Milestone of an auto-claude run.
Check:
(test -d node_modules || npm ci --prefer-offline --no-audit --no-fund) && npm run lint && npm run typecheck && grep -rqF 'prints request queue p50 and p90 after the review --max fan-out' src && grep -rqF 'adds a Transport section with the queue time to the audit report' src && test "$(wc -l < src/cli/reviewMaxCommand.tsx)" -le "$(git show origin/main:src/cli/reviewMaxCommand.tsx | wc -l)" && npx vitest run src/cli/reviewQueueTime src/cli/reviewAudit src/cli/reviewMax src/adapters/httpDispatcherPlan: .claude/auto-plan.md (local to the run).