Skip to content

Commit a898510

Browse files
overlookmotelBoshen
authored andcommitted
ci(codegen): add benchmark for minified printing
1 parent 9b6e344 commit a898510

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tasks/benchmark/benches/codegen.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ fn bench_codegen(criterion: &mut Criterion) {
2727
});
2828
group.finish();
2929

30+
// Codegen minified
31+
let mut group = criterion.benchmark_group("codegen_minify");
32+
group.bench_function(id.clone(), |b| {
33+
b.iter_with_large_drop(|| {
34+
CodeGenerator::new()
35+
.with_options(CodegenOptions { minify: true, ..CodegenOptions::default() })
36+
.build(&program)
37+
.map
38+
});
39+
});
40+
group.finish();
41+
3042
// Codegen sourcemap
3143
let scoping = SemanticBuilder::new().build(&program).semantic.into_scoping();
3244

0 commit comments

Comments
 (0)