Skip to content

Fix completion accounting in load and startup measurement helpers - #949

Closed
Gajesh2007 wants to merge 3 commits into
masterfrom
refactor/startup-load-measurements
Closed

Gajesh2007 wants to merge 3 commits into
masterfrom
refactor/startup-load-measurements

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

The soak can finish with a successful request missing from its CSV because its reporter stops at the admission deadline while workers are still running. The lightweight load driver also reports token throughput at response-header time, before reading the completed body. Malformed startup-probe terminal reasons can abort the observer instead of producing an unavailable observation.

The soak now has one reporting owner: stop admission, drain the executor, then write the final window. Named CSV fields replace repeated positional projection, and cumulative counters are captured under the same lock as window counters. The light driver measures successful completion through body decoding. Startup validation handles malformed origin/config values and terminal reasons through the existing refusal/report paths. Unused timing locals are removed from the parallel model benchmark.

All 13 soak CSV columns, percentile/rate formulas, prompt modes, request payloads, model selections, timeout defaults and credential requirements remain. The final soak window includes drain time and completions. Existing ttfb_* fields still represent non-streaming total latency; these scripts do not establish streaming decode speed or cache hits. Startup inference still requires both explicit flags, a disposable target config and an authorized environment-sourced key; its gates, schema and redaction remain.

Before

flowchart TD
  A[Soak main] --> B[Worker executor]
  A --> C[Daemon reporter stops at admission deadline]
  B --> D[Late request completes after last CSV window]
  A --> E[Timed sleep then close CSV]
  F[Light worker receives headers] --> G[Capture elapsed then read JSON]
  G --> H[Token rate divides by header time]
  I[Startup TestProbe.run] --> J[Set membership on untrusted terminal reason]
  J --> K[Array or object raises before report]
Loading

After

flowchart TD
  A[main delegates run_soak] --> B[One owner writes named CSV snapshots]
  B --> C[Stop admission in finally]
  C --> D[Executor drains in-flight requests]
  D --> E[Final locked snapshot then close CSV]
  F[Light worker receives headers] --> G[Read JSON then capture elapsed]
  G --> H[Token rate includes completed response]
  I[TestProbe validates JSON fields] --> J[Unavailable observation for malformed terminal reason]
  J --> K[Existing bounded retries and redacted report]
Loading

Validation: 23 CPU tests pass using owned loopback HTTP stubs, controlled worker barriers and fake clocks. The final load tests require no timed sleeps or optional aiohttp dependency. Original-source reproductions show a missing final CSV success, 20 tok/s instead of 4 tok/s for a five-second response, and malformed JSON exceptions. The old soak reproduction adapts only its callable CLI signature/exit for the fixture; its lifecycle is unchanged. A 1,000-window differential confirms all prior metric values remain exactly equal for mixed successes/errors. Docs lint passes on all 278 documents.

No live inference, Swift compilation, model/GPU execution, deploy or service mutation was run. These results validate helper behavior, not model latency or production readiness.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Sep 12, 2026 12:46am UTC
d-inference-console-ui-dev Ready Ready Preview Sep 12, 2026 12:46am UTC
d-inference-landing Ready Ready Preview Sep 12, 2026 12:46am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T00:48:32.114836Z a1e8929 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

Comment thread scripts/test_load_measurements.py Fixed
@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 134714c4e9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: a1e8929268

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Gajesh2007

Copy link
Copy Markdown
Member Author

Consolidated into #1096, the combined tooling, benchmark and E2E refactor PR. Your latest head a1e892926881aba8dc4a59ee94bed7c7f0ed0e41 is preserved in aggregate 9d2160bb370e8a0dbf3810e61a5e48fe66345651, along with the relevant review fixes. Continue review and merge at #1096 (after provider #1094 and web #1095). Closing this duplicate merge path; the source branch and review history are retained.

@Gajesh2007 Gajesh2007 closed this Sep 16, 2026

This branch had an error being deployed

1 failed and 3 active deployments
Preview – d-inference — a1e89292 Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — a1e89292 Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference-landing — a1e89292 Deployed Sep 12, 2026 by vercel[bot]
benchmarks — a1e89292 Deployed Sep 12, 2026 by Gajesh2007 via E2E Benchmarks #1035
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.

1 participant