File tree 4 files changed +30603
-14
lines changed
4 files changed +30603
-14
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,12 @@ jobs:
21
21
name : Benchmark
22
22
runs-on : ubuntu-latest
23
23
steps :
24
- - name : Checkout Branch
25
- uses : actions/checkout@v4
24
+ - uses : taiki-e/checkout-action@v1
26
25
27
- - name : Setup rust toolchain, cache and cargo-codspeed binary
28
- uses : moonrepo/setup-rust@v1
26
+ - uses : Boshen/setup-rust@main
29
27
with :
30
- channel : stable
31
- cache-target : release
32
- bins : cargo-codspeed
28
+ save-cache : ${{ github.ref_name == 'main' }}
29
+ tools : cargo-codspeed
33
30
34
31
- name : Build Benchmark
35
32
run : cargo codspeed build --features codspeed
Original file line number Diff line number Diff line change @@ -132,13 +132,14 @@ impl TheBencher for SwcBencher {
132
132
}
133
133
134
134
fn transformer_benchmark ( c : & mut Criterion ) {
135
- let filename = "typescript.js" ;
136
- let source = std:: fs:: read_to_string ( filename) . unwrap ( ) ;
137
-
138
- let mut g = c. benchmark_group ( filename) ;
139
- OxcBencher :: bench ( & mut g, & source) ;
140
- SwcBencher :: bench ( & mut g, & source) ;
141
- g. finish ( ) ;
135
+ let filenames = [ "typescript.js" , "cal.com.tsx" ] ;
136
+ for filename in filenames {
137
+ let source = std:: fs:: read_to_string ( Path :: new ( "files" ) . join ( filename) ) . unwrap ( ) ;
138
+ let mut g = c. benchmark_group ( filename) ;
139
+ OxcBencher :: bench ( & mut g, & source) ;
140
+ SwcBencher :: bench ( & mut g, & source) ;
141
+ g. finish ( ) ;
142
+ }
142
143
}
143
144
144
145
criterion_group ! ( transformer, transformer_benchmark) ;
You can’t perform that action at this time.
0 commit comments