11#![ allow( missing_docs) ]
22
33mod bench_complex_replace_source;
4+ mod bench_source_map;
45
56use std:: collections:: HashMap ;
67
@@ -16,6 +17,7 @@ use rspack_sources::{
1617} ;
1718
1819use bench_complex_replace_source:: benchmark_complex_replace_source;
20+ use bench_source_map:: benchmark_parse_source_map_from_json;
1921
2022const HELLOWORLD_JS : & str = include_str ! ( concat!(
2123 env!( "CARGO_MANIFEST_DIR" ) ,
@@ -41,14 +43,6 @@ const BUNDLE_JS_MAP: &str = include_str!(concat!(
4143 env!( "CARGO_MANIFEST_DIR" ) ,
4244 "/benches/fixtures/transpile-rollup/files/bundle.js.map"
4345) ) ;
44- const ANTD_MIN_JS : & str = include_str ! ( concat!(
45- env!( "CARGO_MANIFEST_DIR" ) ,
46- "/benches/fixtures/antd-mini/antd.min.js"
47- ) ) ;
48- const ANTD_MIN_JS_MAP : & str = include_str ! ( concat!(
49- env!( "CARGO_MANIFEST_DIR" ) ,
50- "/benches/fixtures/antd-mini/antd.min.js.map"
51- ) ) ;
5246
5347fn benchmark_concat_generate_string ( b : & mut Bencher ) {
5448 let sms_minify = SourceMapSource :: new ( SourceMapSourceOptions {
@@ -251,6 +245,11 @@ fn bench_rspack_sources(criterion: &mut Criterion) {
251245 group
252246 . bench_function ( "complex_replace_source" , benchmark_complex_replace_source) ;
253247
248+ group. bench_function (
249+ "benchmark_parse_source_map_from_json" ,
250+ benchmark_parse_source_map_from_json,
251+ ) ;
252+
254253 group. finish ( ) ;
255254}
256255
0 commit comments