Skip to content

Commit 168ccb0

Browse files
committed
Cleanup
1 parent 357b539 commit 168ccb0

File tree

5 files changed

+36
-31
lines changed

5 files changed

+36
-31
lines changed

.github/workflows/benchmark.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: benchmark
1+
name: Benchmarks
22

33
on:
44
push:

packages/cli/src/benchmark/example.bm.ts

-7
This file was deleted.

packages/cli/src/benchmark/main.ts

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
1-
import 'reflect-metadata';
1+
/* eslint-disable import/no-extraneous-dependencies */ // @TODO: Remove
22

3-
/* eslint-disable import/no-extraneous-dependencies */ // @TODO
3+
import 'reflect-metadata';
44

55
import { Bench } from 'tinybench';
66
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';
99

1010
function registerBenchmarks(bench: Bench) {
11-
// example(bench);
12-
start(bench);
11+
webhook(bench);
1312
}
1413

1514
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+
);
1720

1821
registerBenchmarks(bench);
1922

20-
await bench.warmup();
23+
// await bench.warmup(); // @TODO: Restore
2124
await bench.run();
2225

2326
console.table(bench.table());

packages/cli/src/benchmark/start.bm.ts

-15
This file was deleted.
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
}

0 commit comments

Comments
 (0)