()
| 1 | /** Extra worker flags for CodSpeed CPU simulation, not walltime benchmarks. */ |
| 2 | export function cpuSimulationExecArgv() { |
| 3 | const mode = |
| 4 | process.env.CODSPEED_ENV === undefined |
| 5 | ? undefined |
| 6 | : process.env.CODSPEED_RUNNER_MODE |
| 7 | if (mode === 'simulation' || mode === 'instrumentation') { |
| 8 | // CodSpeed supplies --no-opt, which only disables TurboFan on Node 24. |
| 9 | // Maglev can still compile and inline hot functions between measured runs. |
| 10 | // Compile baseline code on first use, so warmup does not leave functions |
| 11 | // near Sparkplug's later tier-up/batch-compilation thresholds. |
| 12 | // V8 renamed --scavenge-task in Node 20; CodSpeed's old flag is omitted. |
| 13 | // Keep minor GC tied to allocations instead of scheduled foreground tasks. |
| 14 | // Fix the initial/minimum old-generation allocation budget. This can skip |
| 15 | // automatic full collections below the budget; minor GC remains enabled. |
| 16 | return [ |
| 17 | '--no-maglev', |
| 18 | '--always-sparkplug', |
| 19 | '--no-minor-gc-task', |
| 20 | '--initial-old-space-size=512', |
| 21 | ] |
| 22 | } |
| 23 | return [] |
| 24 | } |
no outgoing calls
no test coverage detected