-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(es/testing): Improve comment testing story (#9150)
**Description:** This PR makes `PluginCommentProxy` work by default in `test_fixture()`. This PR adds a scoped-local to `swc_common`, and uses it from `swc_ecma_transforms_testing`. It can't be tested in the main repository, though. We cannot enable `plugin_mode` of `swc_common` in the main SWC repository. **Related issue:** - Closes #9149.
- Loading branch information
Showing
3 changed files
with
102 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3638e97
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
es/full/bugs-1
288594
ns/iter (± 16293
)278567
ns/iter (± 15849
)1.04
es/full/minify/libraries/antd
1571272830
ns/iter (± 60307647
)1716162461
ns/iter (± 34763166
)0.92
es/full/minify/libraries/d3
324674608
ns/iter (± 3670895
)337164247
ns/iter (± 1804375
)0.96
es/full/minify/libraries/echarts
1330742108
ns/iter (± 10918147
)1422284902
ns/iter (± 23490508
)0.94
es/full/minify/libraries/jquery
101264422
ns/iter (± 2845188
)101789780
ns/iter (± 113463
)0.99
es/full/minify/libraries/lodash
112105575
ns/iter (± 1166646
)113439136
ns/iter (± 202905
)0.99
es/full/minify/libraries/moment
58655316
ns/iter (± 501738
)59163793
ns/iter (± 111494
)0.99
es/full/minify/libraries/react
17761831
ns/iter (± 207208
)18241623
ns/iter (± 70486
)0.97
es/full/minify/libraries/terser
266566174
ns/iter (± 4283098
)274080491
ns/iter (± 1854608
)0.97
es/full/minify/libraries/three
431126303
ns/iter (± 2413786
)475560423
ns/iter (± 6515392
)0.91
es/full/minify/libraries/typescript
2970264639
ns/iter (± 21371751
)3135575784
ns/iter (± 35664218
)0.95
es/full/minify/libraries/victory
659344794
ns/iter (± 10578254
)754608324
ns/iter (± 32388380
)0.87
es/full/minify/libraries/vue
140661278
ns/iter (± 1699306
)147967838
ns/iter (± 2237615
)0.95
es/full/codegen/es3
58776
ns/iter (± 1073
)58700
ns/iter (± 264
)1.00
es/full/codegen/es5
59192
ns/iter (± 1118
)58748
ns/iter (± 220
)1.01
es/full/codegen/es2015
58555
ns/iter (± 842
)58822
ns/iter (± 255
)1.00
es/full/codegen/es2016
60152
ns/iter (± 711
)59049
ns/iter (± 569
)1.02
es/full/codegen/es2017
59879
ns/iter (± 1237
)58864
ns/iter (± 184
)1.02
es/full/codegen/es2018
60586
ns/iter (± 170
)58644
ns/iter (± 211
)1.03
es/full/codegen/es2019
60791
ns/iter (± 136
)58568
ns/iter (± 212
)1.04
es/full/codegen/es2020
60694
ns/iter (± 136
)58693
ns/iter (± 198
)1.03
es/full/all/es3
162807027
ns/iter (± 728636
)159587023
ns/iter (± 940498
)1.02
es/full/all/es5
156962787
ns/iter (± 1315806
)154501309
ns/iter (± 931723
)1.02
es/full/all/es2015
115891054
ns/iter (± 649285
)113608424
ns/iter (± 594059
)1.02
es/full/all/es2016
115615092
ns/iter (± 917745
)112793028
ns/iter (± 704059
)1.03
es/full/all/es2017
115135368
ns/iter (± 1412212
)111976410
ns/iter (± 695854
)1.03
es/full/all/es2018
111314282
ns/iter (± 1955524
)109981552
ns/iter (± 505635
)1.01
es/full/all/es2019
112107391
ns/iter (± 1555560
)109407701
ns/iter (± 557917
)1.02
es/full/all/es2020
107695649
ns/iter (± 857303
)105372673
ns/iter (± 966533
)1.02
es/full/parser
469140
ns/iter (± 2962
)450421
ns/iter (± 3825
)1.04
es/full/base/fixer
14678
ns/iter (± 132
)15597
ns/iter (± 246
)0.94
es/full/base/resolver_and_hygiene
77534
ns/iter (± 854
)80313
ns/iter (± 448
)0.97
serialization of serde
269
ns/iter (± 9
)273
ns/iter (± 2
)0.99
css/minify/libraries/bootstrap
22387773
ns/iter (± 247161
)22087608
ns/iter (± 164273
)1.01
css/visitor/compare/clone
1355214
ns/iter (± 14238
)1354637
ns/iter (± 7810
)1.00
css/visitor/compare/visit_mut_span
1482007
ns/iter (± 11764
)1473429
ns/iter (± 6669
)1.01
css/visitor/compare/visit_mut_span_panic
1500551
ns/iter (± 24081
)1496859
ns/iter (± 18606
)1.00
css/visitor/compare/fold_span
1997219
ns/iter (± 17513
)1994577
ns/iter (± 4648
)1.00
css/visitor/compare/fold_span_panic
2128423
ns/iter (± 4328
)2116240
ns/iter (± 2264
)1.01
css/lexer/bootstrap_5_1_3
3476646
ns/iter (± 3607
)3468384
ns/iter (± 17063
)1.00
css/lexer/foundation_6_7_4
2817857
ns/iter (± 11438
)2787669
ns/iter (± 5700
)1.01
css/lexer/tailwind_3_1_1
538450
ns/iter (± 635
)534938
ns/iter (± 1200
)1.01
css/parser/bootstrap_5_1_3
15977275
ns/iter (± 37707
)16014638
ns/iter (± 109166
)1.00
css/parser/foundation_6_7_4
12792543
ns/iter (± 20650
)12783516
ns/iter (± 63800
)1.00
css/parser/tailwind_3_1_1
2538308
ns/iter (± 16775
)2553651
ns/iter (± 2890
)0.99
es/codegen/colors
728226
ns/iter (± 398690
)727048
ns/iter (± 397634
)1.00
es/codegen/large
3002993
ns/iter (± 1632413
)3008937
ns/iter (± 1620687
)1.00
es/codegen/with-parser/colors
40703
ns/iter (± 325
)40212
ns/iter (± 492
)1.01
es/codegen/with-parser/large
449777
ns/iter (± 1951
)450175
ns/iter (± 2619
)1.00
es/minify/libraries/antd
1352452269
ns/iter (± 11735618
)1483913453
ns/iter (± 33509590
)0.91
es/minify/libraries/d3
277627500
ns/iter (± 5932994
)299081368
ns/iter (± 8529025
)0.93
es/minify/libraries/echarts
1108500758
ns/iter (± 26975698
)1267226165
ns/iter (± 18246171
)0.87
es/minify/libraries/jquery
82172363
ns/iter (± 165406
)83604457
ns/iter (± 302410
)0.98
es/minify/libraries/lodash
103647968
ns/iter (± 546430
)105928705
ns/iter (± 251096
)0.98
es/minify/libraries/moment
47719276
ns/iter (± 41007
)48942711
ns/iter (± 256334
)0.98
es/minify/libraries/react
16196285
ns/iter (± 21066
)16356352
ns/iter (± 119384
)0.99
es/minify/libraries/terser
214470202
ns/iter (± 505755
)232773142
ns/iter (± 3190688
)0.92
es/minify/libraries/three
354613496
ns/iter (± 2798163
)400665771
ns/iter (± 3293734
)0.89
es/minify/libraries/typescript
2646628297
ns/iter (± 14563354
)2861358339
ns/iter (± 15638111
)0.92
es/minify/libraries/victory
548754470
ns/iter (± 5213702
)670213274
ns/iter (± 9979539
)0.82
es/minify/libraries/vue
119891373
ns/iter (± 257548
)122620817
ns/iter (± 595818
)0.98
es/visitor/compare/clone
1715795
ns/iter (± 14125
)1737934
ns/iter (± 6836
)0.99
es/visitor/compare/visit_mut_span
2054585
ns/iter (± 2678
)2075961
ns/iter (± 20193
)0.99
es/visitor/compare/visit_mut_span_panic
2058473
ns/iter (± 38046
)2094237
ns/iter (± 157990
)0.98
es/visitor/compare/fold_span
2764131
ns/iter (± 10702
)2800978
ns/iter (± 9049
)0.99
es/visitor/compare/fold_span_panic
2827431
ns/iter (± 11084
)2822500
ns/iter (± 12050
)1.00
es/lexer/colors
9633
ns/iter (± 53
)9369
ns/iter (± 41
)1.03
es/lexer/angular
5193088
ns/iter (± 29978
)4915174
ns/iter (± 60056
)1.06
es/lexer/backbone
671369
ns/iter (± 6116
)634227
ns/iter (± 1721
)1.06
es/lexer/jquery
3669851
ns/iter (± 11451
)3608208
ns/iter (± 8559
)1.02
es/lexer/jquery mobile
5480860
ns/iter (± 8095
)5434120
ns/iter (± 40623
)1.01
es/lexer/mootools
2844918
ns/iter (± 6560
)2802447
ns/iter (± 4023
)1.02
es/lexer/underscore
535580
ns/iter (± 2300
)526217
ns/iter (± 1740
)1.02
es/lexer/three
16475977
ns/iter (± 51010
)16451850
ns/iter (± 65595
)1.00
es/lexer/yui
3009318
ns/iter (± 9802
)2853185
ns/iter (± 8785
)1.05
es/lexer/cal-com
13203867
ns/iter (± 25847
)13114719
ns/iter (± 65396
)1.01
es/lexer/typescript
92078569
ns/iter (± 324262
)91984495
ns/iter (± 1026780
)1.00
es/parser/colors
23878
ns/iter (± 136
)23566
ns/iter (± 46
)1.01
es/parser/angular
12643155
ns/iter (± 106460
)12481024
ns/iter (± 172574
)1.01
es/parser/backbone
1820686
ns/iter (± 5582
)1812826
ns/iter (± 10631
)1.00
es/parser/jquery
10108006
ns/iter (± 52186
)10025730
ns/iter (± 53170
)1.01
es/parser/jquery mobile
15309384
ns/iter (± 74277
)15167663
ns/iter (± 125117
)1.01
es/parser/mootools
7862112
ns/iter (± 10092
)7796456
ns/iter (± 18183
)1.01
es/parser/underscore
1588080
ns/iter (± 6985
)1577895
ns/iter (± 7670
)1.01
es/parser/three
43983596
ns/iter (± 187180
)45034297
ns/iter (± 511052
)0.98
es/parser/yui
7449529
ns/iter (± 42103
)7388686
ns/iter (± 36665
)1.01
es/parser/cal-com
40080071
ns/iter (± 230248
)41290771
ns/iter (± 730674
)0.97
es/parser/typescript
269439879
ns/iter (± 1206521
)271485575
ns/iter (± 715577
)0.99
es/preset-env/usage/builtin_type
135932
ns/iter (± 34468
)136500
ns/iter (± 32942
)1.00
es/preset-env/usage/property
16861
ns/iter (± 131
)16971
ns/iter (± 89
)0.99
es/resolver/typescript
97622782
ns/iter (± 2136088
)105836979
ns/iter (± 2472678
)0.92
es/fixer/typescript
79552774
ns/iter (± 2790402
)84751838
ns/iter (± 1585515
)0.94
es/hygiene/typescript
184942787
ns/iter (± 3377944
)198991173
ns/iter (± 3316535
)0.93
es/resolver_with_hygiene/typescript
310221334
ns/iter (± 3192848
)336856849
ns/iter (± 4595803
)0.92
es/visitor/base-perf/module_clone
57167
ns/iter (± 313
)56558
ns/iter (± 819
)1.01
es/visitor/base-perf/fold_empty
59970
ns/iter (± 428
)60145
ns/iter (± 1073
)1.00
es/visitor/base-perf/fold_noop_impl_all
60351
ns/iter (± 1003
)60037
ns/iter (± 780
)1.01
es/visitor/base-perf/fold_noop_impl_vec
59522
ns/iter (± 340
)59992
ns/iter (± 566
)0.99
es/visitor/base-perf/boxing_boxed_clone
59
ns/iter (± 0
)59
ns/iter (± 0
)1
es/visitor/base-perf/boxing_unboxed_clone
47
ns/iter (± 0
)48
ns/iter (± 0
)0.98
es/visitor/base-perf/boxing_boxed
106
ns/iter (± 0
)105
ns/iter (± 0
)1.01
es/visitor/base-perf/boxing_unboxed
81
ns/iter (± 0
)82
ns/iter (± 0
)0.99
es/visitor/base-perf/visit_contains_this
2502
ns/iter (± 17
)2477
ns/iter (± 24
)1.01
es/base/parallel/resolver/typescript
2499285041
ns/iter (± 130145287
)2449878711
ns/iter (± 71683387
)1.02
es/base/parallel/hygiene/typescript
3252642311
ns/iter (± 41454235
)3405571175
ns/iter (± 31325394
)0.96
babelify-only
485006
ns/iter (± 8593
)497202
ns/iter (± 3656
)0.98
parse_and_babelify_angular
44284690
ns/iter (± 880818
)38804932
ns/iter (± 410152
)1.14
parse_and_babelify_backbone
4385861
ns/iter (± 160052
)4370293
ns/iter (± 160937
)1.00
parse_and_babelify_jquery
28163175
ns/iter (± 514409
)28791829
ns/iter (± 202313
)0.98
parse_and_babelify_jquery_mobile
51641444
ns/iter (± 1138937
)50316326
ns/iter (± 560648
)1.03
parse_and_babelify_mootools
26076661
ns/iter (± 284775
)26282676
ns/iter (± 167268
)0.99
parse_and_babelify_underscore
3660343
ns/iter (± 8665
)3660367
ns/iter (± 18871
)1.00
parse_and_babelify_yui
23961606
ns/iter (± 129907
)24516625
ns/iter (± 150167
)0.98
html/minify/document/css_spec
46696914
ns/iter (± 179997
)45855735
ns/iter (± 179793
)1.02
html/minify/document/github
18596142
ns/iter (± 201579
)18414991
ns/iter (± 98639
)1.01
html/minify/document/stackoverflow
16866998
ns/iter (± 503625
)16732207
ns/iter (± 464917
)1.01
html/minify/document_fragment/css_spec
45723913
ns/iter (± 460144
)45099755
ns/iter (± 797072
)1.01
html/minify/document_fragment/github
18309701
ns/iter (± 141766
)18196855
ns/iter (± 42111
)1.01
html/minify/document_fragment/stackoverflow
16587669
ns/iter (± 65879
)16512007
ns/iter (± 124991
)1.00
html/document/visitor/compare/clone
167735
ns/iter (± 1484
)162617
ns/iter (± 949
)1.03
html/document/visitor/compare/visit_mut_span
182595
ns/iter (± 1133
)180157
ns/iter (± 871
)1.01
html/document/visitor/compare/visit_mut_span_panic
189445
ns/iter (± 5298
)184588
ns/iter (± 5788
)1.03
html/document/visitor/compare/fold_span
233942
ns/iter (± 776
)228893
ns/iter (± 667
)1.02
html/document/visitor/compare/fold_span_panic
283122
ns/iter (± 860
)278970
ns/iter (± 555
)1.01
html/document_fragment/visitor/compare/clone
169333
ns/iter (± 1277
)165129
ns/iter (± 750
)1.03
html/document_fragment/visitor/compare/visit_mut_span
184954
ns/iter (± 946
)180122
ns/iter (± 472
)1.03
html/document_fragment/visitor/compare/visit_mut_span_panic
188940
ns/iter (± 2700
)185815
ns/iter (± 743
)1.02
html/document_fragment/visitor/compare/fold_span
232950
ns/iter (± 2846
)228805
ns/iter (± 853
)1.02
html/document_fragment/visitor/compare/fold_span_panic
281142
ns/iter (± 4634
)277942
ns/iter (± 950
)1.01
html/lexer/css_2021_spec
13001671
ns/iter (± 42988
)12946874
ns/iter (± 54082
)1.00
html/lexer/github_com_17_05_2022
5000343
ns/iter (± 5532
)4972383
ns/iter (± 16503
)1.01
html/lexer/stackoverflow_com_17_05_2022
4701254
ns/iter (± 4742
)4714116
ns/iter (± 12195
)1.00
html/parser/parser_document/css_2021_spec
26081715
ns/iter (± 418068
)25269436
ns/iter (± 66076
)1.03
html/parser/parser_document/github_com_17_05_2022
8690022
ns/iter (± 26105
)8479059
ns/iter (± 29766
)1.02
html/parser/parser_document/stackoverflow_com_17_05_2022
7767543
ns/iter (± 16760
)7385194
ns/iter (± 10135
)1.05
html/parser/parser_document_fragment/css_2021_spec
26111832
ns/iter (± 58539
)24831175
ns/iter (± 43128
)1.05
html/parser/parser_document_fragment/github_com_17_05_2022
8707805
ns/iter (± 11597
)8422932
ns/iter (± 23328
)1.03
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022
7566099
ns/iter (± 19246
)7340436
ns/iter (± 10980
)1.03
This comment was automatically generated by workflow using github-action-benchmark.