Skip to content

Commit 037c646

Browse files
committed
chore: update bench
1 parent 82919cf commit 037c646

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/bench.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,21 @@ const logMemory = (label) => {
2424
};
2525

2626
console.time("jiti:load");
27-
const createJiti = require("../lib/jiti.cjs");
27+
const { createJiti } = await import("jiti");
2828
console.timeEnd("jiti:load");
29-
logMemory("jiti:load:");
29+
logMemory("jiti:load");
3030

3131
console.time("jiti:init");
3232
const jiti = createJiti(import.meta.url, {
3333
moduleCache: false,
3434
fsCache: false,
3535
});
3636
console.timeEnd("jiti:init");
37+
logMemory("jiti:init");
3738

3839
for (let i = 0; i < 4; i++) {
3940
console.time("jiti:import:ts");
4041
await jiti.import("../fixtures/typescript/test.ts");
4142
console.timeEnd("jiti:import:ts");
43+
logMemory("jiti:import:ts");
4244
}

0 commit comments

Comments
 (0)