Skip to content

Commit dc15687

Browse files
committed
test
1 parent cce970a commit dc15687

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- uses: ./.github/actions/prepare-rspack-binding
2828
with:
2929
path: ${{ env.RSPACK_DIR }}
30+
ref: 93a5923cc47582581bf21b8eb7a38e3b23328fae
3031

3132
bench:
3233
needs: prepare-binding
@@ -45,6 +46,7 @@ jobs:
4546
- uses: ./.github/actions/build-rspack
4647
with:
4748
path: ${{ env.RSPACK_DIR }}
49+
ref: 93a5923cc47582581bf21b8eb7a38e3b23328fae
4850
- name: Run benchmark
4951
run: node --expose-gc bin/cli.js bench --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
5052
- id: print-compare-results

lib/scenarios/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import {
1111
getHmrConfig
1212
} from "./utils.js";
1313

14+
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
15+
1416
const rootDir = path.resolve(fileURLToPath(import.meta.url), "../../..");
1517

1618
async function runRspack(ctx) {
@@ -136,6 +138,7 @@ module.exports.plugins.push(new (require("../../lib/scenarios/build-plugin.cjs")
136138

137139
if (global.gc) {
138140
global.gc();
141+
await wait(1000);
139142
} else {
140143
console.log('Garbage collection is not exposed.');
141144
}

0 commit comments

Comments
 (0)