-
Notifications
You must be signed in to change notification settings - Fork 1
/
mysql.bench.ts
29 lines (26 loc) · 899 Bytes
/
mysql.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
import { run, bench, group } from 'mitata';
import { getUser } from './src/helpers';
import {
drizzleMySqlGetUser,
knexMySqlGetUser,
kyselyMySqlGetUser,
mariadbGetUser,
mikroMySqlGetUser,
mySql2GetUser,
prismaMySqlGetUser,
sequelizeMySqlGetUser,
} from './src/mysql';
group('MySQL', async () => {
bench('DrizzleORM', async () => await getUser(drizzleMySqlGetUser));
bench('KnexJS', async () => await getUser(knexMySqlGetUser));
bench('Kysely', async () => await getUser(kyselyMySqlGetUser));
bench('Mariadb', async () => await getUser(mariadbGetUser));
bench('MikroORM', async () => await getUser(mikroMySqlGetUser));
bench('MySQL2', async () => await getUser(mySql2GetUser));
bench('Prisma', async () => await getUser(prismaMySqlGetUser));
bench('Sequelize', async () => await getUser(sequelizeMySqlGetUser));
});
await run({
colors: false,
});
process.exit(0)