-
Notifications
You must be signed in to change notification settings - Fork 1
/
postgres.bench.ts
33 lines (30 loc) · 1.08 KB
/
postgres.bench.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { run, bench, group } from 'mitata';
import { getUser } from './src/helpers';
import {
drizzlePostgreGetUser,
knexPostgresGetUser,
kyselyPostgresGetUser,
mikroPostgresGetUser,
pgGetUser,
postgresGetUser,
prismaPostgresGetUser,
sequelizePostgresGetUser,
typeormPostgresGetUser,
pgTypedGetUser,
} from './src/postgres';
group('PostgreSQL', () => {
bench('DrizzleORM', async () => await getUser(drizzlePostgreGetUser));
bench('KnexJS', async () => await getUser(knexPostgresGetUser));
bench('Kysely', async () => await getUser(kyselyPostgresGetUser));
bench('MikroORM', async () => await getUser(mikroPostgresGetUser));
bench('Pg', async () => await getUser(pgGetUser));
bench('PgTyped', async () => await getUser(pgTypedGetUser));
bench('Postgres.js', async () => await getUser(postgresGetUser));
bench('Prisma', async () => await getUser(prismaPostgresGetUser));
bench('Sequelize', async () => await getUser(sequelizePostgresGetUser));
bench('TypeORM', async () => await getUser(typeormPostgresGetUser));
});
await run({
colors: false,
});
process.exit(0);