mirror of
https://github.com/karakeep-app/karakeep.git
synced 2026-02-28 18:25:55 +01:00
Karakeep Benchmarks
This package spins up a production-like Karakeep stack in Docker, seeds it with a sizeable dataset, then benchmarks a handful of high-signal APIs.
Usage
pnpm --filter @karakeep/benchmarks bench
The command will:
- Start the docker-compose stack on a random free port
- Create a dedicated benchmark user, tags, lists, and hundreds of bookmarks
- Run a suite of benchmarks (create, list, search, and list metadata calls)
- Print a table with ops/sec and latency percentiles
- Tear down the containers and capture logs (unless you opt out)
Configuration
Control the run via environment variables:
BENCH_BOOKMARKS(default400): number of bookmarks to seedBENCH_TAGS(default25): number of tags to seedBENCH_LISTS(default6): number of lists to seedBENCH_SEED_CONCURRENCY(default12): concurrent seeding operationsBENCH_TIME_MS(default1000): time per benchmark caseBENCH_WARMUP_MS(default300): warmup time per caseBENCH_NO_BUILD=1: reuse existing docker images instead of rebuildingBENCH_KEEP_CONTAINERS=1: leave the stack running after the run
The stack uses the package-local docker-compose.yml and serves a tiny HTML fixture from setup/html.