Skip to content

Commit 5b2f16c

Browse files
authored
chore: new rspack source bench case (#187)
1 parent 07c2e81 commit 5b2f16c

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

benches/bench.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ use rspack_sources::{
1717
SourceMap, SourceMapSource, SourceMapSourceOptions,
1818
};
1919

20-
use bench_complex_replace_source::benchmark_complex_replace_source;
20+
use bench_complex_replace_source::{
21+
benchmark_complex_replace_source_map, benchmark_complex_replace_source_source,
22+
};
2123
use bench_source_map::{
2224
benchmark_parse_source_map_from_json, benchmark_source_map_clone,
2325
benchmark_stringify_source_map_to_json,
@@ -152,8 +154,15 @@ fn bench_rspack_sources(criterion: &mut Criterion) {
152154

153155
group.bench_function("cached_source_hash", benchmark_cached_source_hash);
154156

155-
group
156-
.bench_function("complex_replace_source", benchmark_complex_replace_source);
157+
group.bench_function(
158+
"complex_replace_source_map",
159+
benchmark_complex_replace_source_map,
160+
);
161+
162+
group.bench_function(
163+
"complex_replace_source_source",
164+
benchmark_complex_replace_source_source,
165+
);
157166

158167
group.bench_function(
159168
"parse_source_map_from_json",

benches/bench_complex_replace_source.rs

Lines changed: 18 additions & 3 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)