Skip to content

Commit

Permalink
feat: try parallelism
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Dec 18, 2024
1 parent 734008b commit 69b4d9b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
20 changes: 20 additions & 0 deletions 10000.bench.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { bench, describe } from "vitest";
import { rspack } from "@rspack/core";
import rspackConfig from './cases/10000/rspack.config';

describe("10000 modules project", () => {
bench("build with development mode", () => new Promise((resolve, reject) => {
rspack({
...rspackConfig,
mode: "development"
}, (err, stats) => {
if (err) {
reject(err);
}
if (stats?.hasErrors()) {
reject(new Error(stats.toString({})));
}
resolve();
});
}));
});
6 changes: 4 additions & 2 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import codspeedPlugin from "@codspeed/vitest-plugin";
import { defineConfig } from "vitest/config";

export default defineConfig({
plugins: [codspeedPlugin()]
// ...
plugins: [codspeedPlugin()],
test: {
fileParallelism: true
},
});

0 comments on commit 69b4d9b

Please sign in to comment.