File tree Expand file tree Collapse file tree 5 files changed +36
-31
lines changed
packages/cli/src/benchmark Expand file tree Collapse file tree 5 files changed +36
-31
lines changed Original file line number Diff line number Diff line change 1
- name : benchmark
1
+ name : Benchmarks
2
2
3
3
on :
4
4
push :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- import 'reflect-metadata' ;
1
+ /* eslint-disable import/no-extraneous-dependencies */ // @TODO : Remove
2
2
3
- /* eslint-disable import/no-extraneous-dependencies */ // @TODO
3
+ import 'reflect-metadata' ;
4
4
5
5
import { Bench } from 'tinybench' ;
6
6
import { withCodSpeed } from '@codspeed/tinybench-plugin' ;
7
- // import { example } from './example.bm';
8
- import { start } from './start .bm' ;
7
+
8
+ import { webhook } from './webhook .bm' ;
9
9
10
10
function registerBenchmarks ( bench : Bench ) {
11
- // example(bench);
12
- start ( bench ) ;
11
+ webhook ( bench ) ;
13
12
}
14
13
15
14
async function main ( ) {
16
- const bench = withCodSpeed ( new Bench ( ) ) ;
15
+ const bench = withCodSpeed (
16
+ new Bench (
17
+ { time : 0 , iterations : 1 } , // @TEMP : Remove
18
+ ) ,
19
+ ) ;
17
20
18
21
registerBenchmarks ( bench ) ;
19
22
20
- await bench . warmup ( ) ;
23
+ // await bench.warmup(); // @TODO: Restore
21
24
await bench . run ( ) ;
22
25
23
26
console . table ( bench . table ( ) ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import type Bench from 'tinybench' ;
2
+ // import { init } from './init';
3
+
4
+ export const testDbPrefix = 'n8n_test_' ;
5
+
6
+ export function webhook ( bench : Bench ) {
7
+ bench . add (
8
+ '`start` command' ,
9
+ async ( ) => {
10
+ // console.log('ended');
11
+ console . log ( bench . iterations ) ;
12
+ } ,
13
+ {
14
+ beforeAll : async ( ) => {
15
+ console . log ( 'beforeAll start' ) ;
16
+
17
+ // await init.startCommand();
18
+ // await init.database();
19
+
20
+ console . log ( 'beforeAll end' ) ;
21
+ } ,
22
+ } ,
23
+ ) ;
24
+ }
You can’t perform that action at this time.
0 commit comments