Skip to content

test: a nightly perf report against the latest release - #3355

Merged
mattzcarey merged 6 commits into
mainfrom
slim/nightly-perf
Nov 27, 2026
Merged

mattzcarey merged 6 commits into
mainfrom
slim/nightly-perf

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

The nightly workspace gets a perf report (cd nightly && pnpm run perf [regex]), the perf agent's probe moved into the repository. It bundles the probe Worker twice: on the latest release of agents, @cloudflare/ai-chat and @cloudflare/think, installed together from npm in a scratch directory, and on this repository's build. It runs every scenario on a local wrangler dev of each and prints one markdown table, with each cell release / this build and bold where this build costs more. The scenarios are Think, AIChatAgent and plain Agent turns, queues, submissions, recoveries, connects, fibers, tasks and schedules, at the root and in facets. A facet scenario also gets a (sum) row (leaf, @mid and @root), and only that row is bolded. The columns are statements, rows written and read, KV writes, alarm writes, storage.sync() calls, rows left and jobs left. Once the nightly workflow (#3341) runs it, the table also goes to the job summary.

It is a report, not a gate: it fails only when a scenario breaks on this build and not on the release. A scenario failing on both is listed without numbers; today that is recovery-transient-throw on Think and AIChatAgent, which get no reply within 30 s. Each call has a 120 s deadline and each WebSocket open 30 s, so a scenario that cannot finish fails its row. When the local runtime is found down after a scenario, a fresh one starts and the scenario runs once more, and it is broken only if it fails again. Each wrangler dev runs in its own process group, so wrangler and workerd stop together, also on Ctrl-C.

Three rows differ from the perf agent's budget. The reconnect in resume-mid-stream acknowledges the offered stream as useAgentChat does, so think/resume-mid-stream and chat/resume-mid-stream count the replay. agent/task-5-steps leaves its task polls out of the counts. The scenarios that need a stream in flight (resume-mid-stream, queued) wait until one is streaming, not for a fixed time. The probe reads one private field (the reply stream's hasActiveStream, named differently in the release) to know a reply is streaming; no public API says so.

Validated: a full run (76 rows plus the facet sums, about ten minutes); the root rows match the budget where they overlap (Think queued-3 104 / 107 rows written).

@changeset-bot

changeset-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e66a17e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@agent-think

agent-think Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ agents import sizes: no significant changes (5efa3d7d → e66a17e2, workflow run)

@pkg-pr-new

pkg-pr-new Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@3355

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@3355

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@3355

hono-agents

npm i https://pkg.pr.new/hono-agents@3355

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@3355

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@3355

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@3355

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@3355

commit: e66a17e

@mattzcarey
mattzcarey marked this pull request as ready for review November 27, 2026 03:11
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@mattzcarey
mattzcarey force-pushed the slim/nightly-soak branch 2 times, most recently from 72bf1c1 to 3bcc6e1 Compare November 27, 2026 05:20
@mattzcarey
mattzcarey force-pushed the slim/nightly-perf branch 3 times, most recently from 199e18e to f27c9a6 Compare November 27, 2026 05:24
devin-ai-integration[bot]

This comment was marked as resolved.

Base automatically changed from slim/nightly-soak to main November 27, 2026 05:29
…out as broken, acknowledges a resumed stream, keeps task polls out of the counts, and stops its runtimes when interrupted
…un on a fresh runtime, wait for a live stream instead of fixed sleeps
devin-ai-integration[bot]

This comment was marked as resolved.

…ures, reset a quarter into the reply, fail a schedule that never ticks and a failed seed, clean scratch on Ctrl-C, PERF_PORT

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Devin Review

Comment thread nightly/perf/report.ts Resolved
@mattzcarey
mattzcarey merged commit 58f10c8 into main Nov 27, 2026
18 checks passed
@mattzcarey
mattzcarey deleted the slim/nightly-perf branch November 27, 2026 05:58
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