Skip to content

Commit c64ebd3

Browse files
committed
add cal.com.tsx
1 parent ef0d9e3 commit c64ebd3

File tree

4 files changed

+30606
-8
lines changed

4 files changed

+30606
-8
lines changed

.github/workflows/benchmark.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
- 'Cargo.lock'
1717
- 'rust-toolchain.toml'
1818

19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
21+
cancel-in-progress: ${{ github.ref_name != 'main' }}
22+
1923
jobs:
2024
benchmark:
2125
name: Benchmark

benches/parser.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::path::Path;
2+
13
use criterion::{measurement::WallTime, *};
24
use rayon::prelude::*;
35

@@ -78,14 +80,15 @@ impl TheBencher for BiomeBencher {
7880
}
7981

8082
fn parser_benchmark(c: &mut Criterion) {
81-
let filename = "typescript.js";
82-
let source = std::fs::read_to_string(filename).unwrap();
83-
84-
let mut g = c.benchmark_group(filename);
85-
OxcBencher::bench(&mut g, &source);
86-
SwcBencher::bench(&mut g, &source);
87-
BiomeBencher::bench(&mut g, &source);
88-
g.finish();
83+
let filenames = ["typescript.js", "cal.com.tsx"];
84+
for filename in filenames {
85+
let source = std::fs::read_to_string(Path::new("files").join(filename)).unwrap();
86+
let mut g = c.benchmark_group(filename);
87+
OxcBencher::bench(&mut g, &source);
88+
SwcBencher::bench(&mut g, &source);
89+
BiomeBencher::bench(&mut g, &source);
90+
g.finish();
91+
}
8992
}
9093

9194
criterion_group!(parser, parser_benchmark);

0 commit comments

Comments
 (0)