benchmarks/ in the repository. It is not published to npm and has no dependencies of its own: it loads the built SDK and uses performance.now() for timing.
No results are published on this page yet. Numbers will be pasted in from a CI run (see below), with the hardware they came from. Until then, treat any performance claim about TheAuth as unmeasured.
What it measures
Backends: SQLite through sql.js (in memory and file), SQLite through better-sqlite3 (in memory and file), and Postgres and MySQL when a connection URL is provided (
POSTGRES_URL, MYSQL_URL, or DATABASE_URL). Backends without a URL are skipped.
For each row the report gives p50, p95 and p99 latency, operations per second, RSS change, and the Node version, CPU model and backend it ran on.
Run it
The full run is heavy. Do not run it on a laptop. It is meant for the manualBenchmarks workflow, which starts Postgres and MySQL service containers, runs everything and uploads full.json and full.md as an artifact.
To check that the harness works on your machine, run the smoke profile (a few hundred iterations, in memory SQLite only):
@glinr/theauth, runs node --expose-gc benchmarks/run.mjs --profile full, then node benchmarks/report.mjs to write markdown tables. Output goes to benchmarks/results/ (git ignored).
Caveats
- Concurrency numbers are async tasks on one event loop, not threads.
- Postgres and MySQL run on the same machine as the benchmark, so network latency is close to zero.
- Shared CI runners are noisy at the tail. Repeat runs before trusting p99.
- Table sizes grow during a run, which affects operations that scan.