MCPcopy Index your code
hub / github.com/drizzle-team/drizzle-benchmarks

github.com/drizzle-team/drizzle-benchmarks @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
66 symbols 244 edges 35 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Drizzle Benchmarks

Drizzle has always been fast, we just wanted you to have a meaningful benchmarks experience

We ran our benchmarks on 2 separate machines, so that observer does not influence results. For database we're using PostgreSQL instance with 42MB of E-commerce data(~370k records).
K6 benchmarking instance lives on MacBook Air and makes 1M prepared requests through 1GB ethernet to Lenovo M720q with Intel Core i3-9100T and 32GB of RAM.

image

To run your own tests - follow instructions below!

Prepare test machine

  1. Spin up a docker container with PostgreSQL using pnpm start:docker command. You can configure a desired database port in ./src/docker.ts file:
...
}

const desiredPostgresPort = 5432; // change here
main();
  1. Update DATABASE_URL with allocated database port in .env file:
DATABASE_URL="postgres://postgres:postgres@localhost:5432/postgres"
  1. Seed your database with test data using pnpm start:seed command, you can change the size of the database in ./src/seed.ts file:
...
}

main("micro"); // nano | micro
  1. Make sure you have Node version 18 installed or above, we've used Node v24. You can use nvm use 24 command
  2. Start Drizzle/Prisma server:
## Drizzle
pnpm start:drizzle

## Prisma
pnpm prepare:prisma
pnpm start:prisma

Prepare testing machine

  1. Generate a list of http requests with pnpm start:generate. It will output a list of http requests to be run on the tested server | ./data/requests.json
  2. Install k6 load tester
  3. Run benchmarks 🚀
    Use the built-in benchmark runner:
tsx bench/index --host http://192.168.31.144:3000 --name my-bench --folder results

http://192.168.31.144:3000 // drizzle
http://192.168.31.144:3001 // prisma
  1. Prepare final combined results
    After benchmarks finish, merge all outputs into a single JSON file:
tsx bench/prepare --folder results

Extension points exported contracts — how you extend this code

DBTX (Interface)
(no doc)
go/db/db.go
CpuUsage (Interface)
(no doc)
src/drizzle-server-bun-elysia.ts
CpuUsage (Interface)
(no doc)
src/prisma-server-bun-elysia.ts
CpuUsage (Interface)
(no doc)
src/cpu-usage.ts
CpuUsage (Interface)
(no doc)
src/drizzle-server-node-elysia.ts

Core symbols most depended-on inside this repo

shuffle
called by 32
src/generate.ts
getRandomInt
called by 18
src/seed.ts
getRandomInt
called by 18
src/sqlite/seed.ts
getInt32
called by 16
go/main.go
Close
called by 9
go/db/client.go
Query
called by 7
go/db/db.go
QueryRow
called by 6
go/db/db.go
generateIds
called by 5
src/generate.ts

Shape

Struct 22
Function 21
Method 18
Interface 5

Languages

Go70%
TypeScript30%

Modules by API surface

go/db/queries.sql.go26 symbols
go/db/db.go7 symbols
go/db/models.go6 symbols
src/sqlite/seed.ts4 symbols
src/seed.ts4 symbols
src/generate.ts4 symbols
go/main.go4 symbols
go/db/client.go3 symbols
src/test.ts1 symbols
src/prisma-server-bun-elysia.ts1 symbols
src/drizzle-server-node-elysia.ts1 symbols
src/drizzle-server-bun-elysia.ts1 symbols

Datastores touched

postgresDatabase · 1 repos

For agents

$ claude mcp add drizzle-benchmarks \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact