File tree Expand file tree Collapse file tree 5 files changed +49
-12
lines changed Expand file tree Collapse file tree 5 files changed +49
-12
lines changed Original file line number Diff line number Diff line change 19
19
node-version-file : " .nvmrc"
20
20
- run : pnpm install --frozen-lockfile --prefer-offline
21
21
- run : pnpm moon check --all
22
+
23
+ codspeed :
24
+ runs-on : " ubuntu-latest"
25
+ steps :
26
+ - uses : " actions/checkout@v3"
27
+ - run : sudo apt-get install -y valgrind
28
+
29
+ with :
30
+ version : latest
31
+ - uses : " actions/setup-node@v3"
32
+ with :
33
+ cache : " pnpm"
34
+ node-version-file : " .nvmrc"
35
+ - run : pnpm install --frozen-lockfile --prefer-offline
36
+ - run : pnpm moon run :build
37
+
38
+ - name : Run benchmarks
39
+ uses : CodSpeedHQ/action@v1
40
+ with :
41
+ token : ${{ secrets.CODSPEED_TOKEN }}
42
+ run : pnpm moon run :bench
43
+ upload_url : https://api.staging.preview.codspeed.io/upload
Original file line number Diff line number Diff line change
1
+ tasks :
2
+ bench :
3
+ command : ts-node benches/sample.ts
4
+ inputs :
5
+ - " benches/**"
6
+ local : true
7
+ options :
8
+ cache : false
Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ bench
19
19
a = b - a ;
20
20
} ) ;
21
21
22
- await bench . run ( ) ;
23
-
24
- console . table (
25
- bench . tasks . map ( ( { name , result } ) => ( {
26
- "Task Name " : name ,
27
- "Average Time (ps)" : result ?. mean ? result . mean * 1000 : "N/A" ,
28
- "Variance (ps)" : result ?. variance ? result . variance * 1000 : "N/A" ,
29
- } ) )
30
- ) ;
22
+ bench . run ( ) . then ( ( ) => {
23
+ console . table (
24
+ bench . tasks . map ( ( { name , result } ) => ( {
25
+ "Task Name" : name ,
26
+ "Average Time (ps) " : result ?. mean ? result . mean * 1000 : "N/A" ,
27
+ "Variance (ps)" : result ?. variance ? result . variance * 1000 : "N/A" ,
28
+ } ) )
29
+ ) ;
30
+ } ) ;
Original file line number Diff line number Diff line change
1
+ tasks :
2
+ bench :
3
+ command : ts-node benches/sample.ts
4
+ inputs :
5
+ - " benches/**"
6
+ local : true
7
+ options :
8
+ cache : false
Original file line number Diff line number Diff line change 2
2
"compilerOptions" : {
3
3
"composite" : true ,
4
4
"moduleResolution" : " node" ,
5
- "target" : " es6 " ,
6
- "module" : " CommonJS " ,
5
+ "target" : " ESNext " ,
6
+ "module" : " NodeNext " ,
7
7
"lib" : [" esnext" ],
8
8
"types" : [" node" ],
9
9
"strict" : true ,
12
12
"sourceMap" : true ,
13
13
"emitDecoratorMetadata" : true ,
14
14
"skipLibCheck" : true ,
15
- "allowJs" : true ,
16
15
"forceConsistentCasingInFileNames" : true ,
17
16
"esModuleInterop" : true ,
18
17
"resolveJsonModule" : true ,
You can’t perform that action at this time.
0 commit comments