Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed May 31, 2024
1 parent cce970a commit dc15687
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- uses: ./.github/actions/prepare-rspack-binding
with:
path: ${{ env.RSPACK_DIR }}
ref: 93a5923cc47582581bf21b8eb7a38e3b23328fae

bench:
needs: prepare-binding
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions lib/scenarios/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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.');
}
Expand Down

0 comments on commit dc15687

Please sign in to comment.