Skip to content

Add Run.wakeUp() method to interrupt pending sleeps#1232

Merged
pranaygp merged 14 commits into
mainfrom
worktree-wake-up-run
Mar 3, 2026
Merged

Add Run.wakeUp() method to interrupt pending sleeps#1232
pranaygp merged 14 commits into
mainfrom
worktree-wake-up-run

Conversation

@pranaygp
Copy link
Copy Markdown
Contributor

@pranaygp pranaygp commented Mar 1, 2026

Summary

  • Adds Run.wakeUp(options?) instance method that delegates to the existing wakeUpRun helper, letting users programmatically interrupt pending sleep() calls
  • Exports StopSleepOptions and StopSleepResult types from workflow/api
  • Extends the testing docs integration example to demonstrate using wakeUp() to skip sleeps in tests
  • Adds wakeUp() docs and examples to the getRun() API reference page

Test plan

  • Added 3 new tests for Run.wakeUp() (delegates correctly, passes correlationIds, handles no pending waits)
  • All 390 core tests pass
  • Build succeeds

🤖 Generated with Claude Code

v0 Bot and others added 8 commits March 1, 2026 20:09
Create new 'testing/' section and update Foundations index page.

Slack-Thread: https://vercel.slack.com/archives/C09125LC4AX/p1772375177894629?thread_ts=1772375177.894629&cid=C09125LC4AX
Co-authored-by: Pranay Prakash <1797812+pranaygp@users.noreply.github.com>
Update documentation to emphasize unit testing for steps only.

Slack-Thread: https://vercel.slack.com/archives/C09125LC4AX/p1772375177894629?thread_ts=1772375177.894629&cid=C09125LC4AX
Co-authored-by: Pranay Prakash <1797812+pranaygp@users.noreply.github.com>
Move testing to top-level, fix content and update meta files.

Slack-Thread: https://vercel.slack.com/archives/C09125LC4AX/p1772375177894629?thread_ts=1772375177.894629&cid=C09125LC4AX
Co-authored-by: Pranay Prakash <1797812+pranaygp@users.noreply.github.com>
Add 'globalSetup' script and vitest config, and update docs for test debugging.

Slack-Thread: https://vercel.slack.com/archives/C09125LC4AX/p1772375177894629?thread_ts=1772375177.894629&cid=C09125LC4AX
Co-authored-by: Pranay Prakash <1797812+pranaygp@users.noreply.github.com>
… sleeps

Exposes the existing `wakeUpRun` logic as an instance method on the `Run`
class, allowing users to skip sleep() calls in tests or custom UIs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 1, 2026 21:35
@pranaygp pranaygp requested a review from a team as a code owner March 1, 2026 21:35
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 1, 2026

🦋 Changeset detected

Latest commit: 02a1c30

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@workflow/core Patch
workflow Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/web-shared Patch
@workflow/world-testing Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 1, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 1, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 534 0 49 583
✅ 💻 Local Development 568 0 68 636
✅ 📦 Local Production 568 0 68 636
✅ 🐘 Local Postgres 568 0 68 636
✅ 🪟 Windows 50 0 3 53
❌ 🌍 Community Worlds 113 46 9 168
✅ 📋 Other 138 0 21 159
Total 2539 46 286 2871

❌ Failed Tests

🌍 Community Worlds (46 failed)

turso (46 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling retry behavior workflow completes despite transient 5xx on step_completed
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 48 0 5
✅ example 48 0 5
✅ express 48 0 5
✅ fastify 48 0 5
✅ hono 48 0 5
✅ nextjs-turbopack 51 0 2
✅ nextjs-webpack 51 0 2
✅ nitro 48 0 5
✅ nuxt 48 0 5
✅ sveltekit 48 0 5
✅ vite 48 0 5
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 46 0 7
✅ express-stable 46 0 7
✅ fastify-stable 46 0 7
✅ hono-stable 46 0 7
✅ nextjs-turbopack-canary 50 0 3
✅ nextjs-turbopack-stable 50 0 3
✅ nextjs-webpack-canary 50 0 3
✅ nextjs-webpack-stable 50 0 3
✅ nitro-stable 46 0 7
✅ nuxt-stable 46 0 7
✅ sveltekit-stable 46 0 7
✅ vite-stable 46 0 7
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 46 0 7
✅ express-stable 46 0 7
✅ fastify-stable 46 0 7
✅ hono-stable 46 0 7
✅ nextjs-turbopack-canary 50 0 3
✅ nextjs-turbopack-stable 50 0 3
✅ nextjs-webpack-canary 50 0 3
✅ nextjs-webpack-stable 50 0 3
✅ nitro-stable 46 0 7
✅ nuxt-stable 46 0 7
✅ sveltekit-stable 46 0 7
✅ vite-stable 46 0 7
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 46 0 7
✅ express-stable 46 0 7
✅ fastify-stable 46 0 7
✅ hono-stable 46 0 7
✅ nextjs-turbopack-canary 50 0 3
✅ nextjs-turbopack-stable 50 0 3
✅ nextjs-webpack-canary 50 0 3
✅ nextjs-webpack-stable 50 0 3
✅ nitro-stable 46 0 7
✅ nuxt-stable 46 0 7
✅ sveltekit-stable 46 0 7
✅ vite-stable 46 0 7
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 50 0 3
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 0
✅ mongodb 50 0 3
✅ redis-dev 3 0 0
✅ redis 50 0 3
✅ turso-dev 3 0 0
❌ turso 4 46 3
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 46 0 7
✅ e2e-local-postgres-nest-stable 46 0 7
✅ e2e-local-prod-nest-stable 46 0 7

📋 View full workflow run

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a public Run.wakeUp() API to programmatically interrupt pending sleep() waits (primarily for testing and tooling), and updates exports + docs so the new capability is available from workflow/api.

Changes:

  • Add Run.wakeUp(options?) on the core runtime Run class, delegating to the existing wakeUpRun helper.
  • Export StopSleepOptions / StopSleepResult from workflow/api and workflow/api-workflow.
  • Add tests and documentation examples demonstrating skipping sleeps via wakeUp().

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/workflow/src/api.ts Re-export StopSleepOptions/StopSleepResult for runtime consumers.
packages/workflow/src/api-workflow.ts Re-export types in workflow-only stub entrypoint.
packages/core/src/runtime/run.ts Introduces Run.wakeUp() instance method delegating to wakeUpRun.
packages/core/src/runtime/runs.test.ts Adds unit tests for Run.wakeUp() and refactors test helper placement.
docs/content/docs/testing/index.mdx Updates integration testing example to demonstrate skipping a long sleep() via wakeUp().
docs/content/docs/api-reference/workflow-api/get-run.mdx Documents wakeUp() usage and surfaces StopSleep* types in the API reference.
.github/workflows/claude.yml Removes the Claude Code GitHub Action workflow.
.changeset/add-run-wake-up.md Adds changeset entry for patch releases of @workflow/core and workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/core/src/runtime/runs.test.ts Outdated
Comment thread .changeset/add-run-wake-up.md
Comment thread packages/core/src/runtime/run.ts Outdated
Comment thread .github/workflows/claude.yml Outdated
@@ -1,50 +0,0 @@
name: Claude Code
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this diff is showing up because of git rebase issues. main already removed this. it won't be included in the rebase/squash merge

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Restored the file to match the base branch — the deletion no longer shows in this PR's diff.

Use the // @setup comment pattern to provide type context without
rendering the setup line, keeping the snippet lean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pranaygp and others added 2 commits March 1, 2026 14:06
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 0.033s (-2.7%) 1.005s (~) 0.973s 10 1.00x
💻 Local Nitro 0.034s (+3.7%) 1.005s (~) 0.971s 10 1.04x
🌐 Redis Next.js (Turbopack) 0.039s 1.005s 0.965s 10 1.21x
💻 Local Next.js (Turbopack) 0.040s 1.005s 0.966s 10 1.22x
🐘 Postgres Next.js (Turbopack) 0.049s 1.011s 0.962s 10 1.50x
🐘 Postgres Nitro 0.057s (-6.3% 🟢) 1.012s (~) 0.955s 10 1.75x
🐘 Postgres Express 0.059s (+8.3% 🔺) 1.013s (~) 0.955s 10 1.80x
🌐 MongoDB Next.js (Turbopack) 0.102s 1.008s 0.906s 10 3.14x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 0.509s (-30.6% 🟢) 1.995s (-9.1% 🟢) 1.486s 10 1.00x
▲ Vercel Nitro 0.590s (+10.0% 🔺) 2.006s (-1.0%) 1.416s 10 1.16x
▲ Vercel Express 0.606s (+32.2% 🔺) 1.999s (+9.5% 🔺) 1.393s 10 1.19x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.079s 2.006s 0.927s 10 1.00x
💻 Local Express 1.103s (-0.6%) 2.005s (~) 0.902s 10 1.02x
💻 Local Next.js (Turbopack) 1.107s 2.006s 0.899s 10 1.03x
💻 Local Nitro 1.109s (~) 2.006s (~) 0.897s 10 1.03x
🐘 Postgres Nitro 1.128s (~) 2.011s (~) 0.883s 10 1.04x
🐘 Postgres Next.js (Turbopack) 1.128s 2.011s 0.883s 10 1.05x
🐘 Postgres Express 1.137s (+1.4%) 2.012s (~) 0.875s 10 1.05x
🌐 MongoDB Next.js (Turbopack) 1.308s 2.008s 0.700s 10 1.21x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.173s (~) 3.363s (+2.4%) 1.191s 10 1.00x
▲ Vercel Express 2.252s (+9.8% 🔺) 3.290s (+9.6% 🔺) 1.038s 10 1.04x
▲ Vercel Nitro 2.286s (-60.7% 🟢) 3.505s (-48.5% 🟢) 1.219s 10 1.05x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 10.608s 11.024s 0.416s 3 1.00x
💻 Local Next.js (Turbopack) 10.757s 11.023s 0.266s 3 1.01x
💻 Local Express 10.827s (~) 11.021s (~) 0.194s 3 1.02x
🐘 Postgres Next.js (Turbopack) 10.853s 11.041s 0.188s 3 1.02x
💻 Local Nitro 10.885s (~) 11.023s (~) 0.137s 3 1.03x
🐘 Postgres Nitro 10.888s (~) 11.042s (~) 0.154s 3 1.03x
🐘 Postgres Express 11.020s (+1.4%) 11.392s (+3.2%) 0.373s 3 1.04x
🌐 MongoDB Next.js (Turbopack) 12.261s 13.020s 0.760s 3 1.16x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 17.228s (+2.7%) 18.343s (+4.8%) 1.115s 2 1.00x
▲ Vercel Nitro 17.436s (+2.2%) 18.498s (+2.8%) 1.061s 2 1.01x
▲ Vercel Next.js (Turbopack) 18.235s (+7.7% 🔺) 19.323s (+8.9% 🔺) 1.087s 2 1.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 26.540s 27.054s 0.515s 3 1.00x
🐘 Postgres Next.js (Turbopack) 27.186s 28.068s 0.882s 3 1.02x
🐘 Postgres Nitro 27.215s (~) 28.065s (~) 0.850s 3 1.03x
💻 Local Next.js (Turbopack) 27.314s 28.052s 0.738s 3 1.03x
💻 Local Express 27.507s (~) 28.052s (~) 0.545s 3 1.04x
🐘 Postgres Express 27.534s (+1.1%) 28.081s (~) 0.547s 3 1.04x
💻 Local Nitro 27.631s (~) 28.053s (~) 0.422s 3 1.04x
🌐 MongoDB Next.js (Turbopack) 30.442s 31.036s 0.594s 2 1.15x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 45.775s (-2.6%) 46.750s (-2.7%) 0.975s 2 1.00x
▲ Vercel Next.js (Turbopack) 47.246s (+2.2%) 48.449s (+2.3%) 1.203s 2 1.03x
▲ Vercel Nitro 47.385s (+8.4% 🔺) 48.731s (+7.4% 🔺) 1.346s 2 1.04x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 53.814s 54.102s 0.288s 2 1.00x
🐘 Postgres Next.js (Turbopack) 54.929s 55.104s 0.175s 2 1.02x
🐘 Postgres Nitro 55.194s (~) 56.098s (~) 0.904s 2 1.03x
🐘 Postgres Express 55.681s (+1.2%) 56.123s (+1.9%) 0.443s 2 1.03x
💻 Local Next.js (Turbopack) 56.995s 57.105s 0.110s 2 1.06x
💻 Local Express 57.331s (~) 58.103s (~) 0.771s 2 1.07x
💻 Local Nitro 57.471s (~) 58.108s (~) 0.637s 2 1.07x
🌐 MongoDB Next.js (Turbopack) 61.152s 61.571s 0.419s 2 1.14x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 101.555s (+7.3% 🔺) 102.835s (+6.6% 🔺) 1.280s 1 1.00x
▲ Vercel Nitro 101.905s (+6.5% 🔺) 104.475s (+7.9% 🔺) 2.570s 1 1.00x
▲ Vercel Express 101.956s (~) 103.672s (~) 1.716s 1 1.00x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.199s 2.006s 0.808s 15 1.00x
🐘 Postgres Nitro 1.378s (-0.6%) 2.009s (~) 0.631s 15 1.15x
🐘 Postgres Next.js (Turbopack) 1.390s 2.010s 0.621s 15 1.16x
💻 Local Express 1.400s (~) 2.005s (~) 0.605s 15 1.17x
💻 Local Nitro 1.414s (-0.9%) 2.005s (~) 0.591s 15 1.18x
💻 Local Next.js (Turbopack) 1.426s 2.006s 0.580s 15 1.19x
🐘 Postgres Express 1.431s (+4.3%) 2.012s (~) 0.581s 15 1.19x
🌐 MongoDB Next.js (Turbopack) 2.147s 3.008s 0.861s 10 1.79x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.462s (+4.3%) 3.547s (+5.4% 🔺) 1.085s 9 1.00x
▲ Vercel Express 2.531s (+21.8% 🔺) 3.683s (+24.3% 🔺) 1.151s 9 1.03x
▲ Vercel Nitro 2.548s (-6.0% 🟢) 3.649s (-2.9%) 1.101s 9 1.03x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.008s (-2.4%) 2.515s (-3.1%) 0.507s 12 1.00x
🐘 Postgres Next.js (Turbopack) 2.080s 2.680s 0.600s 12 1.04x
🐘 Postgres Express 2.118s (+11.6% 🔺) 2.686s (+8.5% 🔺) 0.567s 12 1.05x
🌐 Redis Next.js (Turbopack) 2.387s 3.008s 0.622s 10 1.19x
💻 Local Nitro 2.551s (-5.6% 🟢) 3.008s (~) 0.457s 10 1.27x
💻 Local Express 2.627s (+1.6%) 3.009s (~) 0.381s 10 1.31x
💻 Local Next.js (Turbopack) 2.635s 3.107s 0.472s 10 1.31x
🌐 MongoDB Next.js (Turbopack) 4.783s 5.178s 0.395s 6 2.38x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.697s (~) 3.413s (-1.8%) 0.716s 9 1.00x
▲ Vercel Next.js (Turbopack) 2.940s (+15.2% 🔺) 4.081s (+14.8% 🔺) 1.142s 8 1.09x
▲ Vercel Express 2.942s (+17.8% 🔺) 3.791s (+15.9% 🔺) 0.850s 8 1.09x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.636s (+0.6%) 4.312s (~) 0.677s 7 1.00x
🐘 Postgres Next.js (Turbopack) 3.807s 4.595s 0.787s 7 1.05x
🌐 Redis Next.js (Turbopack) 3.835s 4.009s 0.174s 8 1.05x
🐘 Postgres Nitro 3.946s (+6.9% 🔺) 4.747s (+6.7% 🔺) 0.801s 7 1.09x
💻 Local Nitro 6.855s (-10.5% 🟢) 7.219s (-10.0% 🟢) 0.364s 5 1.89x
💻 Local Next.js (Turbopack) 7.381s 8.017s 0.637s 4 2.03x
💻 Local Express 7.553s (+4.5%) 8.020s (+3.2%) 0.467s 4 2.08x
🌐 MongoDB Next.js (Turbopack) 9.906s 10.347s 0.441s 3 2.72x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.478s (+19.3% 🔺) 4.462s (+11.9% 🔺) 0.983s 7 1.00x
▲ Vercel Express 3.493s (+24.4% 🔺) 4.391s (+14.4% 🔺) 0.898s 8 1.00x
▲ Vercel Next.js (Turbopack) 3.712s (-1.7%) 4.873s (+9.3% 🔺) 1.161s 7 1.07x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.193s 2.006s 0.813s 15 1.00x
🐘 Postgres Next.js (Turbopack) 1.383s 2.010s 0.627s 15 1.16x
🐘 Postgres Nitro 1.386s (~) 2.011s (~) 0.625s 15 1.16x
💻 Local Nitro 1.418s (-3.0%) 2.005s (~) 0.587s 15 1.19x
🐘 Postgres Express 1.429s (+2.6%) 2.013s (~) 0.584s 15 1.20x
💻 Local Express 1.443s (~) 2.006s (~) 0.562s 15 1.21x
💻 Local Next.js (Turbopack) 1.526s 2.073s 0.547s 15 1.28x
🌐 MongoDB Next.js (Turbopack) 2.196s 3.008s 0.813s 10 1.84x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.391s (+9.6% 🔺) 3.647s (+15.9% 🔺) 1.255s 9 1.00x
▲ Vercel Next.js (Turbopack) 2.708s (+3.9%) 3.849s (+4.8%) 1.141s 8 1.13x
▲ Vercel Nitro 2.735s (+27.4% 🔺) 3.835s (+21.8% 🔺) 1.100s 8 1.14x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 2.028s 2.514s 0.486s 12 1.00x
🐘 Postgres Nitro 2.058s (+1.8%) 2.599s (+3.4%) 0.541s 12 1.01x
🐘 Postgres Express 2.066s (+4.4%) 2.521s (~) 0.455s 12 1.02x
🌐 Redis Next.js (Turbopack) 2.386s 3.008s 0.622s 10 1.18x
💻 Local Nitro 2.640s (-1.3%) 3.008s (~) 0.368s 10 1.30x
💻 Local Express 2.737s (+3.4%) 3.008s (~) 0.270s 10 1.35x
💻 Local Next.js (Turbopack) 2.845s 3.007s 0.162s 10 1.40x
🌐 MongoDB Next.js (Turbopack) 4.787s 5.178s 0.391s 6 2.36x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.477s (+7.1% 🔺) 3.294s (+7.9% 🔺) 0.817s 10 1.00x
▲ Vercel Nitro 2.630s (-2.0%) 3.494s (-2.1%) 0.864s 9 1.06x
▲ Vercel Next.js (Turbopack) 2.814s (+9.9% 🔺) 3.843s (+8.5% 🔺) 1.029s 8 1.14x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.491s (-10.9% 🟢) 4.309s (-9.0% 🟢) 0.818s 7 1.00x
🌐 Redis Next.js (Turbopack) 3.930s 4.135s 0.205s 8 1.13x
🐘 Postgres Express 4.114s (+2.3%) 4.881s (+6.3% 🔺) 0.767s 7 1.18x
🐘 Postgres Next.js (Turbopack) 4.372s 5.353s 0.981s 6 1.25x
💻 Local Next.js (Turbopack) 7.351s 7.816s 0.465s 5 2.11x
💻 Local Nitro 7.807s (+0.7%) 8.270s (+3.1%) 0.463s 4 2.24x
💻 Local Express 8.085s (+6.7% 🔺) 8.770s (+9.4% 🔺) 0.685s 4 2.32x
🌐 MongoDB Next.js (Turbopack) 9.889s 10.349s 0.460s 3 2.83x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.091s (+1.9%) 4.299s (+7.0% 🔺) 1.208s 7 1.00x
▲ Vercel Nitro 3.101s (-2.9%) 4.391s (+6.5% 🔺) 1.290s 7 1.00x
▲ Vercel Next.js (Turbopack) 3.491s (+3.8%) 4.442s (-1.2%) 0.952s 8 1.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 0.114s 1.000s 0.002s 1.007s 0.893s 10 1.00x
💻 Local Next.js (Turbopack) 0.153s 1.001s 0.011s 1.017s 0.865s 10 1.33x
💻 Local Express 0.171s (-6.9% 🟢) 1.002s (~) 0.011s (+5.8% 🔺) 1.016s (~) 0.845s 10 1.50x
💻 Local Nitro 0.182s (+4.7%) 1.002s (~) 0.011s (-2.8%) 1.016s (~) 0.834s 10 1.59x
🐘 Postgres Next.js (Turbopack) 0.183s 1.001s 0.002s 1.012s 0.829s 10 1.60x
🐘 Postgres Nitro 0.190s (-3.8%) 0.996s (~) 0.001s (-6.7% 🟢) 1.011s (~) 0.821s 10 1.66x
🐘 Postgres Express 0.238s (+28.0% 🔺) 0.993s (~) 0.002s (+13.3% 🔺) 1.014s (~) 0.776s 10 2.08x
🌐 MongoDB Next.js (Turbopack) 0.491s 0.958s 0.002s 1.009s 0.518s 10 4.29x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 1.674s (-9.1% 🟢) 2.438s (-2.5%) 0.126s (-17.2% 🟢) 3.049s (-2.2%) 1.375s 10 1.00x
▲ Vercel Express 1.709s (+2.8%) 2.290s (-4.1%) 0.626s (+234.1% 🔺) 3.360s (+11.9% 🔺) 1.651s 10 1.02x
▲ Vercel Nitro 1.710s (+5.5% 🔺) 2.388s (+13.7% 🔺) 0.195s (+36.0% 🔺) 3.014s (+11.7% 🔺) 1.304s 10 1.02x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Next.js (Turbopack) 5/12
🐘 Postgres Next.js (Turbopack) 7/12
▲ Vercel Next.js (Turbopack) 5/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 💻 Local 6/12
Next.js (Turbopack) 🌐 Redis 8/12
Nitro 🐘 Postgres 6/12
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

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.

3 participants