seed

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Command seed writes the load dataset as PostgreSQL COPY text, one table per invocation.

It exists because two million items cannot be created through the API in any time worth spending, and because a dataset that is not reproducible is not a baseline: a regression guard compares two runs, and if the data underneath them differs the comparison measures the data. So every identifier here is derived from a seed by hashing, and the same seed produces the same two million rows on any machine, in any order the loader chooses.

It holds no database driver, deliberately. It writes to standard output and scripts/seed-load- dataset.sh pipes it into `psql \copy`, which keeps rule 3 - every query through the transaction wrapper - a statement about code that talks to a database, rather than one with an exception in it.

The distribution is a long tail rather than an even split, because the capacity figure is throughput per vCPU *and its decay with items per tenant*: an even split would have no decay to measure. Rank r of n tenants gets a share proportional to 1/(r+1) - Zipf, the shape a real installation has, where a handful of workspaces hold most of the work and the rest hold a few hundred items each.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL