Skip to content

test(task-runner): measure the concurrent runner on Linux and in CI - #258

Open
prisis wants to merge 1 commit into
nextfrom
t3/runner-linux-bench
Open

prisis wants to merge 1 commit into
nextfrom
t3/runner-linux-bench

Conversation

@prisis

@prisis prisis commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Problem

The native concurrent runner has a throughput gate before it can become the default: within 1.25x of the JS spawner on 200 echo tasks (maxProcesses 8) and within +10 ms on one task. It was only measured on one macOS arm64 machine, and Linux still starts commands through the fork-based pre_exec(setsid) path, so nobody knows whether Linux meets the gate.

Change

  • __bench__/concurrent-throughput.script.ts: adds a "1 task, cold process" row (a fresh node per run, 20 runs, median), which is what one command costs a user, and reads the single-task gate from it. Optional BENCH_SUMMARY writes the markdown table to a file.
  • .github/workflows/runner-bench.yml: advisory workflow that builds the release addon on ubuntu-24.04, macOS and Windows and prints the table to the job summary. It is path-filtered to the runner and the harness, can be started by hand, never fails on a number and is not a required check.

No Rust changes: the Linux spawn path would only change if the runner numbers failed the gate, and they do not.

Hosted-runner medians (native / JS; gate is 1.25x on 200 tasks and +10 ms on one cold task):

runner 200 tasks, maxProcesses 8 1 task, cold process
ubuntu-24.04 x64 0.72x +0.2 ms
macos-latest arm64 1.11x +0.2 ms
windows-latest x64 0.64x +0.2 ms

Notes for review

  • The harness calls the two runners directly (runNativeConcurrent, runConcurrentFallback) with shellPath pinned, not runConcurrently with VIS_CONCURRENT_RUNNER=js: the environment variable does not exist yet (it arrives with the default switch), and going through runConcurrently would add the restart, teardown and shell-lookup wrappers to both sides alike. The shell lookup is excluded either way.
  • Local numbers (not authoritative): macOS arm64 and a Linux arm64 container (glibc 2.36) meet the gate too.

🤖 Generated with Claude Code

The throughput script now also times one task in a fresh node process per
run, which is what a single command costs a user (the addon load and the
runtime start are part of it), and the single-task gate reads that row. It
writes its table to a job summary when asked to.

A new advisory workflow builds the release addon on Linux, macOS and
Windows and prints the table, so the throughput gate can be read from the
runners rather than from one machine. It never fails on a number.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo did not review this PR because this workspace reached its daily trial limit of 100 reviews. Reviews start again at 00:00 UTC. Choose a plan to continue now.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ca30f571-66ff-4bc8-92fd-0052ee5fa49e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@github-actions github-actions Bot added package: task-runner size:L Size of the change, tests and generated files excluded. vouch:trusted PR author is a collaborator, a bot or on the VOUCHED list. labels Nov 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: task-runner size:L Size of the change, tests and generated files excluded. vouch:trusted PR author is a collaborator, a bot or on the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant