From 7283d44acd89790faa012224cb8a7768a50323fd Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 23 Sep 2026 20:05:20 +0800 Subject: [PATCH 1/3] perf: skip memory benchmark warmup runs --- README.md | 2 +- scripts/benchmark.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dc539a05f..791f978a9 100644 --- a/README.md +++ b/README.md @@ -366,7 +366,7 @@ Use `RUN_TIMES` to specify the number of runs (defaults to `3`): RUN_TIMES=3 pnpm benchmark ``` -Use `WARMUP_TIMES` to specify the number of warmup runs (defaults to `2`): +Use `WARMUP_TIMES` to specify the number of timing warmup runs (defaults to `2`): ```bash WARMUP_TIMES=2 pnpm benchmark diff --git a/scripts/benchmark.ts b/scripts/benchmark.ts index 3ddb78a8e..3165b8b5a 100644 --- a/scripts/benchmark.ts +++ b/scripts/benchmark.ts @@ -481,6 +481,7 @@ const metadata = { maxAttempts: 2, measurements: ['timing', 'memory'], warmupTimes, + memoryWarmupTimes: 0, runTimes, node: process.version, platform: process.platform, @@ -934,6 +935,7 @@ async function benchAllCases(): Promise { for (const buildTool of shuffledBuildTools) { ensureMetrics(perfResult, buildTool.name); for (const measurement of ['timing', 'memory'] as const) { + if (measurement === 'memory' && iteration < warmupTimes) continue; logger.info(`${buildTool.name}: ${measurement} pass`); for (const unit of runDev ? ['dev', 'build'] : ['build']) { const context = { tool: buildTool.name, measurement, unit, iteration }; From 91679bbc6b24404eac2dea669b96921af81e3a1c Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 23 Sep 2026 20:07:03 +0800 Subject: [PATCH 2/3] docs: keep warmup documentation unchanged --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 791f978a9..dc539a05f 100644 --- a/README.md +++ b/README.md @@ -366,7 +366,7 @@ Use `RUN_TIMES` to specify the number of runs (defaults to `3`): RUN_TIMES=3 pnpm benchmark ``` -Use `WARMUP_TIMES` to specify the number of timing warmup runs (defaults to `2`): +Use `WARMUP_TIMES` to specify the number of warmup runs (defaults to `2`): ```bash WARMUP_TIMES=2 pnpm benchmark From 013526461dd00bbcbfe8aa214c18c62bc7e0b83e Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 23 Sep 2026 20:07:52 +0800 Subject: [PATCH 3/3] refactor: omit memory warmup metadata --- scripts/benchmark.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/benchmark.ts b/scripts/benchmark.ts index 3165b8b5a..599e1493d 100644 --- a/scripts/benchmark.ts +++ b/scripts/benchmark.ts @@ -481,7 +481,6 @@ const metadata = { maxAttempts: 2, measurements: ['timing', 'memory'], warmupTimes, - memoryWarmupTimes: 0, runTimes, node: process.version, platform: process.platform,