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 installin root) and is build (pnpm -r devorpnpm buildin root). - Run
pnpm testto run the test suite - Run
pnpm test:updateto 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.tsfiles. - Each
*.bench.tsfile can contain multiple attest benchmarks and a dedicated baseline. - The generated prisma client for each schema can be found in the
generatedsubfolder 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 withwithclauses
prisma.schema.bench.ts- Prisma generated types evaluationdrizzle.schema.bench.ts- Drizzle schema types evaluation