From dc15687528d746e12e752f4c92ac7bec0b0c54cf Mon Sep 17 00:00:00 2001 From: Cong-Cong Date: Fri, 31 May 2024 16:17:40 +0800 Subject: [PATCH] test --- .github/workflows/ci.yml | 2 ++ lib/scenarios/index.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a377819..60c8b166 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,7 @@ jobs: - uses: ./.github/actions/prepare-rspack-binding with: path: ${{ env.RSPACK_DIR }} + ref: 93a5923cc47582581bf21b8eb7a38e3b23328fae bench: needs: prepare-binding @@ -45,6 +46,7 @@ jobs: - uses: ./.github/actions/build-rspack with: path: ${{ env.RSPACK_DIR }} + ref: 93a5923cc47582581bf21b8eb7a38e3b23328fae - name: Run benchmark run: node --expose-gc bin/cli.js bench --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} - id: print-compare-results diff --git a/lib/scenarios/index.js b/lib/scenarios/index.js index 3c960495..dca97fa9 100644 --- a/lib/scenarios/index.js +++ b/lib/scenarios/index.js @@ -11,6 +11,8 @@ import { getHmrConfig } from "./utils.js"; +const wait = ms => new Promise(resolve => setTimeout(resolve, ms)); + const rootDir = path.resolve(fileURLToPath(import.meta.url), "../../.."); async function runRspack(ctx) { @@ -136,6 +138,7 @@ module.exports.plugins.push(new (require("../../lib/scenarios/build-plugin.cjs") if (global.gc) { global.gc(); + await wait(1000); } else { console.log('Garbage collection is not exposed.'); }