This package contains type benchmarks tests using attest.
These were initially developed together with David Blass.
- Make sure the overall monorepo has dependency installed (
pnpm install
in root) and is build (pnpm -r dev
orpnpm build
in root). - Run
pnpm test
to run the test suite - Run
pnpm test:update
to update snapshot recordings - Run
pnpm test <filter>
to run only files including in their filename - Run
pnpm test:update <filter>
to only update snapshots of files including in their filename
- Each folder in this directory contains a different schema.
- Each schema can be tested with multiple
*.bench.ts
files. - Each
*.bench.ts
file can contain multiple attest benchmarks and a dedicated baseline. - The generated prisma client for each schema can be found in the
generated
subfolder after a test run.
This project includes several benchmark suites comparing type-checking performance:
prisma.query.bench.ts
- Prisma ORM queries using generated client typesdrizzle.query.bench.ts
- Drizzle ORM SQL-like query builder with manual joinsdrizzle.relational.bench.ts
- Drizzle ORM Relational Query Builder (RQB) usingdb.query.*
API withwith
clauses
prisma.schema.bench.ts
- Prisma generated types evaluationdrizzle.schema.bench.ts
- Drizzle schema types evaluation