writeonce/docs/examples
shoney.arickathil 5b1a8c96a1 feat(db-bench): replay baseline — boot cost tracks history, not data
Closes the last gap in databasev2 1; gives databasev2 3 its "before".

- `boot` mode: does NOTHING. WO_DATA replay runs before main, so a mode
  with no work measures replay plus a fixed startup
- `replayseed N M`: N inserts + M updates — same live rows, longer log
- `replay` leg: empty-store startup floor measured and SUBTRACTED, then
  two shapes timed, median of 3 boots each
- premise check: updates must actually append WAL records, else the two
  shapes are one measurement and the penalty means nothing
- WAL bytes = non-zero prefix, never file size (fallocate'd to 1 MiB)
- per-record cost stored in NANOseconds: as us it rounded 5.5 and 5.3 to
  6 and 5, too coarse for the number a checkpoint exists to improve
- 148 checks, 0 failures; gate bites on a doctored ns_per_record

Measured — same 20 000 live rows, different history:

- 20 000 records:  980 035 B WAL, 110 ms replay, 5.5 us/record
- 40 000 records: 1 960 035 B WAL, 211 ms replay, 5.3 us/record
- 1.9x boot cost for an IDENTICAL dataset; per-record cost flat, so
  replay is linear in records not rows
- extrapolated: 10M records ~55 s of boot, 100M ~9 min

- databasev2 3 correction: it planned to use "22's aged-store replay
  numbers", which never existed — 22 proved restart correctness, never
  timed it
- databasev2 3 hazard recorded: compaction rewrites the log and moves
  every record, so it invalidates every `resident: keys` offset — an
  arbitrary byte in a rewritten file, not stale-but-readable
- databasev2 1 -> status: done

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 21:25:24 +02:00
..
db-actor docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
db-bench feat(db-bench): replay baseline — boot cost tracks history, not data 2026-08-27 21:25:24 +02:00
employee docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
employee-list docs(databasev2): third track — the database beyond RAM, with per-table storage modes 2026-08-26 20:52:48 +02:00
fibers feat(lang+wo-html): raw text literals, component layer, MVC samples 2026-08-25 03:58:41 +02:00
gc-cycle docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
log-watcher docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
operators feat: iteration 36 task 5 — operators sample, docs closeout 2026-08-22 21:42:08 +02:00
porch docs(porch): give the framework its own story track, iterations 1-8 2026-08-26 20:17:33 +02:00
shop refactor(porch): name the web framework porch, fix the wo.toml identifier claim 2026-08-26 19:36:34 +02:00
site refactor(porch): name the web framework porch, fix the wo.toml identifier claim 2026-08-26 19:36:34 +02:00
web-app refactor(porch): name the web framework porch, fix the wo.toml identifier claim 2026-08-26 19:36:34 +02:00
writeonce-view feat(serve+view): file serving, downloads, supported systems; rename 2026-08-25 04:41:00 +02:00