Skip to content

fix(exec-harness): add --always-sparkplug to the node wrapper flags - #598

Draft
not-matthias wants to merge 1 commit into
mainfrom
cod-4038-mirror-always-sparkplug
Draft

not-matthias wants to merge 1 commit into
mainfrom
cod-4038-mirror-always-sparkplug

Conversation

@not-matthias

Copy link
Copy Markdown
Member

Add --always-sparkplug to the exec-harness node wrapper

The wrapper mirrors getV8Flags(), but its analysis flag set was missing
--always-sparkplug. The integration requires it so the measured code is
compiled eagerly and does not tier up during the run.

This only becomes visible with the integration-side self-restart: a benchmark
process whose execArgv lacks a required flag replaces itself with the missing
ones. Without this flag, every normal codspeed exec analysis run would restart
once, even though the wrapper had already supplied the flags. With the mirror
complete, the restart only fires for launchers that really bypass the wrapper,
such as Bazel's rules_js.

Verified by running the wrapper with Node 24 in analysis mode and comparing its
execArgv with getV8Flags() from @codspeed/core: the sets match, and the
expected_flags table in the wrapper tests matches the emitted order.

Companion change: CodSpeedHQ/codspeed-node#113

Refs COD-4038

codspeed-node requires --always-sparkplug in analysis mode: it compiles the
benchmark eagerly with Sparkplug so the measured code does not tier up during
the run. The wrapper mirrors getV8Flags(), so without it the integration sees a
missing flag on the normal codspeed exec path.

That surfaced with the integration-side restart: a benchmark process whose
execArgv lacks any required flag replaces itself with the missing ones. Keeping
the mirror complete means the restart only fires for launchers that really
bypass the wrapper, such as Bazel's rules_js.

Refs COD-4038
@codspeed

codspeed Bot commented Oct 29, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 8 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 41 untouched benchmarks
⏩ 6 skipped benchmarks1


Comparing cod-4038-mirror-always-sparkplug (b7d00c0) with main (d14d95d)

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

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