Commit a455372
benchmark: rewrite detect-esm-syntax benchmark
Syntax detection has been unflagged so it's no longer meaningful
to toggle the detection based on CLI flags. It was also previously
benchmarking cached module imports which isn't very meaningful
for subsequent loads. This patch updates the benchmark to toggle
the detection based on the presence of type field in the package.json,
and generates fixtures to benchmark fresh module loads.
PR-URL: #55238
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent b963db9 commit a455372Copy full SHA for a455372
File tree
Expand file treeCollapse file tree
1 file changed
+16
-17
lines changedOpen diff view settings
Filter options
- benchmark/esm
Expand file treeCollapse file tree
1 file changed
+16
-17
lines changedOpen diff view settings
Collapse file
benchmark/esm/detect-esm-syntax.js
Copy file name to clipboardExpand all lines: benchmark/esm/detect-esm-syntax.js+16-17Lines changed: 16 additions & 17 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
8 | | - |
9 | 7 | |
10 | 8 | |
11 | 9 | |
12 | | - |
| 10 | + |
13 | 11 | |
14 | | - |
15 | | - |
16 | 12 | |
17 | 13 | |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | 14 | |
23 | 15 | |
| 16 | + |
24 | 17 | |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
| 18 | + |
| 19 | + |
31 | 20 | |
32 | | - |
33 | | - |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
34 | 25 | |
| 26 | + |
| 27 | + |
35 | 28 | |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
36 | 35 | |
37 | 36 | |
0 commit comments