chadtmiller.com/monolith
An atproto PDS
0
0
The soak's results are analyze.mjs's output, from each run's files
bench/soak/data/day-local-disk/server-log.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/night1/server-log.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/settle-laptop/events-local.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/settle-laptop/summary-local.jsonnew+52−0
| @@ -0,0 +1,52 @@ | ||
{ | ||
"side": "local", | ||
"updated": "2026-11-13T16:41:47.137Z", | ||
"started": "2026-11-13T16:31:45.701Z", | ||
"accounts": 5, | ||
"records": 9397, | ||
"lastSeq": 10105, | ||
"totals": { | ||
"ops": 18540, | ||
"ok": 18540, | ||
"e5xx": 0, | ||
"e4xx": 0, | ||
"limited": 0, | ||
"down": 0, | ||
"mismatches": 0, | ||
"lost": 0, | ||
"found": 0, | ||
"seqJumps": 0, | ||
"missingCommits": 0, | ||
"outages": 0, | ||
"outageMs": 0, | ||
"verifies": 9 | ||
}, | ||
"lastWindow": { | ||
"from": "2026-11-13T16:41:47.100Z", | ||
"to": "2026-11-13T16:41:47.137Z", | ||
"ops": { | ||
"post": { | ||
"n": 1, | ||
"p50": 6.4, | ||
"p99": 6.4, | ||
"outcomes": { | ||
"ok": 1 | ||
} | ||
}, | ||
"listRecords": { | ||
"n": 1, | ||
"p50": 1.1, | ||
"p99": 1.1, | ||
"outcomes": { | ||
"ok": 1 | ||
} | ||
} | ||
}, | ||
"firehose": { | ||
"events": 1, | ||
"lagP50": 0, | ||
"lagP99": 0 | ||
}, | ||
"lastSeq": 10105 | ||
} | ||
} | ||
| \ No newline at end of file | ||
bench/soak/data/settle-laptop-restart/events-local.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/settle-laptop-restart/summary-local.jsonnew+181−0
| @@ -0,0 +1,181 @@ | ||
{ | ||
"side": "local", | ||
"updated": "2026-11-13T16:48:35.694Z", | ||
"started": "2026-11-13T16:44:29.315Z", | ||
"accounts": 5, | ||
"records": 3714, | ||
"lastSeq": 4046, | ||
"totals": { | ||
"ops": 7408, | ||
"ok": 7407, | ||
"e5xx": 0, | ||
"e4xx": 0, | ||
"limited": 0, | ||
"down": 1, | ||
"mismatches": 0, | ||
"lost": 0, | ||
"found": 0, | ||
"seqJumps": 0, | ||
"missingCommits": 0, | ||
"outages": 1, | ||
"outageMs": 5103, | ||
"verifies": 4 | ||
}, | ||
"lastWindow": { | ||
"from": "2026-11-13T16:44:29.316Z", | ||
"to": "2026-11-13T16:48:35.693Z", | ||
"ops": { | ||
"createAccount": { | ||
"n": 6, | ||
"p50": 57.6, | ||
"p99": 101.4, | ||
"outcomes": { | ||
"down": 1, | ||
"ok": 5 | ||
} | ||
}, | ||
"post": { | ||
"n": 1823, | ||
"p50": 6.7, | ||
"p99": 12, | ||
"outcomes": { | ||
"ok": 1823 | ||
} | ||
}, | ||
"like": { | ||
"n": 821, | ||
"p50": 6.9, | ||
"p99": 12, | ||
"outcomes": { | ||
"ok": 821 | ||
} | ||
}, | ||
"profile": { | ||
"n": 218, | ||
"p50": 6.6, | ||
"p99": 13, | ||
"outcomes": { | ||
"ok": 218 | ||
} | ||
}, | ||
"follow": { | ||
"n": 289, | ||
"p50": 6.8, | ||
"p99": 13.3, | ||
"outcomes": { | ||
"ok": 289 | ||
} | ||
}, | ||
"listRecords": { | ||
"n": 661, | ||
"p50": 0.9, | ||
"p99": 3.7, | ||
"outcomes": { | ||
"ok": 661 | ||
} | ||
}, | ||
"getRecord": { | ||
"n": 1103, | ||
"p50": 0.7, | ||
"p99": 2, | ||
"outcomes": { | ||
"ok": 1103 | ||
} | ||
}, | ||
"describeServer": { | ||
"n": 749, | ||
"p50": 0.7, | ||
"p99": 1.7, | ||
"outcomes": { | ||
"ok": 749 | ||
} | ||
}, | ||
"applyWrites": { | ||
"n": 269, | ||
"p50": 7, | ||
"p99": 16.8, | ||
"outcomes": { | ||
"ok": 269 | ||
} | ||
}, | ||
"getRepo": { | ||
"n": 69, | ||
"p50": 2.2, | ||
"p99": 26, | ||
"outcomes": { | ||
"ok": 69 | ||
} | ||
}, | ||
"uploadBlob": { | ||
"n": 159, | ||
"p50": 1.6, | ||
"p99": 7.2, | ||
"outcomes": { | ||
"ok": 159 | ||
} | ||
}, | ||
"blobPost": { | ||
"n": 159, | ||
"p50": 16, | ||
"p99": 20.7, | ||
"outcomes": { | ||
"ok": 159 | ||
} | ||
}, | ||
"delete": { | ||
"n": 447, | ||
"p50": 6.7, | ||
"p99": 12.4, | ||
"outcomes": { | ||
"ok": 447 | ||
} | ||
}, | ||
"getLatestCommit": { | ||
"n": 367, | ||
"p50": 0.7, | ||
"p99": 2, | ||
"outcomes": { | ||
"ok": 367 | ||
} | ||
}, | ||
"describeRepo": { | ||
"n": 156, | ||
"p50": 0.7, | ||
"p99": 3, | ||
"outcomes": { | ||
"ok": 156 | ||
} | ||
}, | ||
"refreshSession": { | ||
"n": 64, | ||
"p50": 5.8, | ||
"p99": 8.4, | ||
"outcomes": { | ||
"ok": 64 | ||
} | ||
}, | ||
"listRecords(verify)": { | ||
"n": 48, | ||
"p50": 0.3, | ||
"p99": 2.1, | ||
"outcomes": { | ||
"ok": 48 | ||
} | ||
}, | ||
"verify": { | ||
"n": 4, | ||
"p50": null, | ||
"p99": null, | ||
"outcomes": { | ||
"ok": 4 | ||
} | ||
} | ||
}, | ||
"firehose": { | ||
"events": 4026, | ||
"lagP50": 0, | ||
"lagP99": 1 | ||
}, | ||
"lastSeq": 4046 | ||
} | ||
} | ||
| \ No newline at end of file | ||
bench/soak/analyze.mjsnew+234−0
| @@ -0,0 +1,234 @@ | ||
// The tables of RESULTS.md, from a run's files (README.md, "Results"): | ||
// | ||
// node bench/soak/analyze.mjs <run dir> [--split <ISO time>]... [--from <ISO>] [--to <ISO>] | ||
// | ||
// The run's directory holds what soak.mjs wrote (summary-*.json, events-*.jsonl) | ||
// and, where they were kept, a sampler's samples.jsonl and kills.jsonl, and | ||
// spec-pds's request lines as server-log.jsonl (its log, PDS_LOG_DIR, cut to | ||
// them); each may be gzipped. --split cuts the time into periods, as before | ||
// and after a change; --from and --to bound everything read by time. | ||
// Markdown on stdout: only the sections the files allow. | ||
// | ||
// A percentile q of n values sorted is the value at floor(q × n), from 0. | ||
| ||
import { existsSync, readFileSync, readdirSync } from 'node:fs' | ||
import { join } from 'node:path' | ||
import { gunzipSync } from 'node:zlib' | ||
| ||
const args = process.argv.slice(2) | ||
const dir = args.find((a, i) => !a.startsWith('--') && !args[i - 1]?.startsWith('--')) | ||
if (!dir) { | ||
console.error('usage: node bench/soak/analyze.mjs <run dir> [--split <ISO>]... [--from <ISO>] [--to <ISO>]') | ||
process.exit(2) | ||
} | ||
const opt = (name) => args.flatMap((a, i) => (a === name ? [args[i + 1]] : [])) | ||
const FROM = opt('--from')[0] ?? '' | ||
const TO = opt('--to')[0] ?? '9' | ||
const SPLITS = opt('--split').sort() | ||
const inRange = (t) => t >= FROM && t < TO | ||
| ||
// ---------------------------------------------------------------- reading | ||
| ||
/// A file of the run, gzipped or not: its text, or null. | ||
function text(name) { | ||
for (const [f, gz] of [[name, false], [`${name}.gz`, true]]) { | ||
const p = join(dir, f) | ||
if (existsSync(p)) return gz ? gunzipSync(readFileSync(p)).toString('utf8') : readFileSync(p, 'utf8') | ||
} | ||
return null | ||
} | ||
const lines = (name) => (text(name) ?? '').split('\n').filter(Boolean).map((l) => JSON.parse(l)) | ||
const files = (re) => readdirSync(dir).filter((f) => re.test(f)) | ||
| ||
const pct = (sorted, q) => (sorted.length ? sorted[Math.min(sorted.length - 1, Math.floor(q * sorted.length))] : null) | ||
const num = (x, d = 1) => (x == null ? '–' : Number(x).toFixed(d)) | ||
const int = (x) => (x == null ? '–' : Math.round(x).toLocaleString('en')) | ||
const mib = (kb) => (kb == null ? '–' : Math.floor(kb / 1024).toLocaleString('en')) | ||
const median = (xs) => pct([...xs].sort((a, b) => a - b), 0.5) | ||
function corr(xs, ys) { | ||
const n = xs.length | ||
if (n < 3) return null | ||
const mx = xs.reduce((a, b) => a + b, 0) / n, my = ys.reduce((a, b) => a + b, 0) / n | ||
let sxy = 0, sxx = 0, syy = 0 | ||
for (let i = 0; i < n; i++) { sxy += (xs[i] - mx) * (ys[i] - my); sxx += (xs[i] - mx) ** 2; syy += (ys[i] - my) ** 2 } | ||
return sxx && syy ? sxy / Math.sqrt(sxx * syy) : null | ||
} | ||
/// The periods --split makes of [FROM, TO): each [from, to). | ||
const periods = () => { | ||
const cuts = [FROM || '0', ...SPLITS, TO] | ||
return cuts.slice(0, -1).map((from, i) => [from, cuts[i + 1]]) | ||
} | ||
const label = ([a, b]) => `${a === '0' || a === '' ? 'start' : a.slice(11, 16)}–${b === '9' ? 'end' : b.slice(11, 16)}` | ||
const out = [] | ||
const table = (head, rows) => { | ||
out.push(`| ${head.join(' | ')} |`, `| ${head.map((_, i) => (i ? '--:' : '---')).join(' | ')} |`) | ||
for (const r of rows) out.push(`| ${r.join(' | ')} |`) | ||
out.push('') | ||
} | ||
| ||
out.push(`# ${dir}`, '') | ||
| ||
// ---------------------------------------------------------------- the soak's totals | ||
| ||
const summaries = files(/^summary-.*\.json$/).map((f) => JSON.parse(readFileSync(join(dir, f), 'utf8'))) | ||
if (summaries.length) { | ||
out.push('## Totals (summary-*.json)', '') | ||
const t = (s) => s.totals | ||
table(['', ...summaries.map((s) => s.side)], [ | ||
['from, to', ...summaries.map((s) => `${s.started?.slice(11, 16)}–${s.updated?.slice(11, 16)}`)], | ||
['accounts, records', ...summaries.map((s) => `${s.accounts}, ${int(s.records)}`)], | ||
['operations', ...summaries.map((s) => int(t(s).ops))], | ||
['5xx', ...summaries.map((s) => int(t(s).e5xx))], | ||
['rate limited (429)', ...summaries.map((s) => int(t(s).limited))], | ||
['lost', ...summaries.map((s) => int(t(s).lost))], | ||
['mismatches', ...summaries.map((s) => int(t(s).mismatches))], | ||
['commits not on the firehose', ...summaries.map((s) => int(t(s).missingCommits))], | ||
['outages, their time', ...summaries.map((s) => `${t(s).outages}, ${num((t(s).outageMs ?? 0) / 1000)} s`)], | ||
]) | ||
} | ||
| ||
// ---------------------------------------------------------------- the soak's windows and verdicts | ||
| ||
const eventsBySide = Object.fromEntries(files(/^events-.*\.jsonl(\.gz)?$/).map((f) => [f.replace(/^events-|\.jsonl(\.gz)?$/g, ''), lines(f.replace(/\.gz$/, ''))])) | ||
const sides = Object.keys(eventsBySide) | ||
if (sides.length) { | ||
const windows = (s) => eventsBySide[s].filter((e) => e.kind === 'window' && inRange(e.from)) | ||
const of = (s, op, q) => windows(s).map((w) => w.ops?.[op]?.[q]).filter((x) => x != null) | ||
out.push("## The soak's times, by five-minute window (events-*.jsonl)", '', 'Each window has its own p50 and p99 per operation; the median of them, and the worst p99. Times are the soak\'s, from request to answer.', '') | ||
const ops = ['post', 'like', 'applyWrites', 'delete', 'getRecord', 'listRecords', 'getLatestCommit', 'getRepo'] | ||
table(['operation', ...sides.flatMap((s) => [`${s} p50`, `${s} p99`, `${s} worst p99`])], ops.map((op) => [op, ...sides.flatMap((s) => [num(median(of(s, op, 'p50'))), num(median(of(s, op, 'p99'))), num(Math.max(...of(s, op, 'p99')) === -Infinity ? null : Math.max(...of(s, op, 'p99')))])])) | ||
const kinds = (s) => { | ||
const c = {} | ||
for (const e of eventsBySide[s]) if (e.kind !== 'window' && inRange(e.time)) c[e.kind] = (c[e.kind] || 0) + 1 | ||
return c | ||
} | ||
out.push('### Events by kind', '') | ||
const all = [...new Set(sides.flatMap((s) => Object.keys(kinds(s))))].sort() | ||
table(['kind', ...sides], all.map((k) => [k, ...sides.map((s) => int(kinds(s)[k] ?? 0))])) | ||
const settled = sides.flatMap((s) => eventsBySide[s].filter((e) => e.kind === 'settled')) | ||
if (settled.length) { | ||
out.push('### The settled check', '') | ||
table(['', ...settled.map((v) => `${v.side}, ${v.time.slice(11, 16)}`)], [ | ||
['live state: repositories + blobs', ...settled.map((v) => `${v.liveMiB} MiB (${v.reposMiB} + ${v.blobsMiB})`)], | ||
['when the load stopped', ...settled.map((v) => (v.loadEndMiB == null ? '–' : `${v.loadEndMiB} MiB`))], | ||
['after 2 W with no write', ...settled.map((v) => `${v.beforeMiB} MiB`)], | ||
['at rest, after a write to each', ...settled.map((v) => `${v.leastMiB} MiB, ${(v.leastMiB / v.liveMiB).toFixed(2)} × live`)], | ||
['the settled bound', ...settled.map((v) => `${v.boundMiB} MiB: ${v.pass ? 'within' : 'over'}`)], | ||
]) | ||
} | ||
} | ||
| ||
// ---------------------------------------------------------------- kills | ||
| ||
const kills = lines('kills.jsonl').filter((k) => k.killed && inRange(k.time)) | ||
if (kills.length) { | ||
out.push('## Kills (kills.jsonl)', '') | ||
const by = {} | ||
for (const k of kills) (by[k.killed] ??= []).push(k.restarted ?? k.started) | ||
table(['container', 'kills', 'serving again after'], Object.entries(by).map(([c, ts]) => [c, ts.length, `${Math.min(...ts)}–${Math.max(...ts)} s`])) | ||
} | ||
| ||
// ---------------------------------------------------------------- samples | ||
| ||
const samples = lines('samples.jsonl').filter((s) => inRange(s.time)) | ||
if (samples.length) { | ||
const containers = Object.keys(samples[0]).filter((k) => samples[0][k]?.rssKb !== undefined) | ||
out.push('## Memory and data over time (samples.jsonl), MiB', '') | ||
const v = (c, k) => samples.map((s) => s[c]?.[k]).filter((x) => x != null && x > 0) | ||
table(['container', 'RSS first, most, last', 'data first, most, last'], containers.map((c) => [c, `${mib(v(c, 'rssKb')[0])}, ${mib(Math.max(...v(c, 'rssKb')))}, ${mib(v(c, 'rssKb').at(-1))}`, `${mib(v(c, 'dataKb')[0])}, ${mib(Math.max(...v(c, 'dataKb')))}, ${mib(v(c, 'dataKb').at(-1))}`])) | ||
const hours = {} | ||
for (const s of samples) hours[s.time.slice(0, 13)] = s | ||
table(['hour (last sample)', ...containers.flatMap((c) => [`${c} RSS`, `${c} data`]), 'free GiB'], Object.values(hours).map((s) => [s.time.slice(11, 16), ...containers.flatMap((c) => [mib(s[c]?.rssKb), mib(s[c]?.dataKb)]), Math.floor(s.freeKb / 1048576)])) | ||
| ||
const synced = samples.filter((s) => s.specFsync && s.specFsync['+Inf'] != null) | ||
if (synced.length > 1) { | ||
out.push("## spec-pds's syncs (samples.jsonl: its fsync histogram, the disk's counters)", '') | ||
// Counts between consecutive samples of the same start (a start sets the histogram to 0). | ||
const steps = [] | ||
for (let i = 1; i < synced.length; i++) { | ||
const a = synced[i - 1], b = synced[i] | ||
const d = (le) => b.specFsync[le] - a.specFsync[le] | ||
if (d('+Inf') < 0) continue | ||
steps.push({ time: b.time, syncs: d('+Inf'), over25: d('+Inf') - d('0.025'), over100: d('+Inf') - d('0.1'), flushMs: b.disk && a.disk ? b.disk.flushMs - a.disk.flushMs : null }) | ||
} | ||
table(['period', 'syncs', 'over 25 ms', 'over 100 ms', 'slow syncs ~ disk flush time (r, a sample apart)'], periods().map((p) => { | ||
const ss = steps.filter((s) => s.time >= p[0] && s.time < p[1]) | ||
const withFlush = ss.filter((s) => s.flushMs != null) | ||
const r = corr(withFlush.map((s) => s.flushMs), withFlush.map((s) => s.over100)) | ||
return [label(p), int(ss.reduce((n, s) => n + s.syncs, 0)), int(ss.reduce((n, s) => n + s.over25, 0)), int(ss.reduce((n, s) => n + s.over100, 0)), num(r, 2)] | ||
})) | ||
} | ||
} | ||
| ||
// ---------------------------------------------------------------- spec-pds's log | ||
| ||
const log = lines('server-log.jsonl').filter((l) => inRange(l.time)) | ||
if (log.length) { | ||
const reqs = log.filter((l) => l.msg === 'request') | ||
const starts = log.filter((l) => l.msg === 'start').map((l) => Date.parse(l.time)) | ||
const AFTER_START_MS = 60_000 | ||
const afterStart = (t) => starts.some((s) => t >= s && t < s + AFTER_START_MS) | ||
const WRITES = /\.(createRecord|deleteRecord|applyWrites|putRecord)$/ | ||
const READS = /\.(getRecord|listRecords|getLatestCommit|describeServer)$/ | ||
const stats = (ms) => { | ||
const s = [...ms].sort((a, b) => a - b) | ||
return [int(s.length), num(pct(s, 0.5)), num(pct(s, 0.99)), num(pct(s, 0.999)), num(s.at(-1))] | ||
} | ||
out.push("## spec-pds's requests, server side (server-log.jsonl)", '', `Its \`request\` lines' \`ms\`. Starts in the log: ${starts.length}.`, '') | ||
const by = {} | ||
for (const r of reqs) (by[r.method] ??= []).push(r.ms) | ||
table(['method', 'n', 'p50 ms', 'p99 ms', 'p99.9 ms', 'worst ms'], Object.entries(by).filter(([, v]) => v.length >= 500).sort((a, b) => b[1].length - a[1].length).map(([m, v]) => [m.replace('com.atproto.', ''), ...stats(v)])) | ||
| ||
out.push(`### createRecord by period, and the ${AFTER_START_MS / 1000} s after each start apart`, '') | ||
const cr = reqs.filter((r) => r.method === 'com.atproto.repo.createRecord') | ||
const rows = periods().flatMap((p) => { | ||
const inP = cr.filter((r) => r.time >= p[0] && r.time < p[1]) | ||
const steady = inP.filter((r) => !afterStart(Date.parse(r.time))) | ||
const after = inP.filter((r) => afterStart(Date.parse(r.time))) | ||
return [[`${label(p)}, but after a start`, ...stats(steady.map((r) => r.ms))], ...(after.length ? [[`${label(p)}, after a start`, ...stats(after.map((r) => r.ms))]] : [])] | ||
}) | ||
table(['', 'n', 'p50 ms', 'p99 ms', 'p99.9 ms', 'worst ms'], rows) | ||
| ||
// What a slow write held up: the requests under way while it was. | ||
out.push('### What a slow write (over 200 ms) held up', '', 'Requests under way during each slow write, but it, slow being over 100 ms.', '') | ||
const span = reqs.map((r) => ({ end: Date.parse(r.time), start: Date.parse(r.time) - r.ms, ms: r.ms, method: r.method, did: r.did })).sort((a, b) => a.start - b.start) | ||
const starts0 = span.map((s) => s.start) | ||
const lower = (x) => { let lo = 0, hi = starts0.length; while (lo < hi) { const m = (lo + hi) >> 1; if (starts0[m] < x) lo = m + 1; else hi = m } return lo } | ||
const c = { other: [0, 0], same: [0, 0], reads: [0, 0] } | ||
let slowN = 0 | ||
for (const w of span) { | ||
if (w.ms <= 200 || !WRITES.test(w.method)) continue | ||
slowN++ | ||
for (let i = lower(w.start - 5000); i < span.length && span[i].start < w.end; i++) { | ||
const o = span[i] | ||
if (o === w || o.end <= w.start) continue | ||
const k = o.ms > 100 ? 1 : 0 | ||
if (WRITES.test(o.method)) c[o.did === w.did ? 'same' : 'other'][k]++ | ||
else if (READS.test(o.method)) c.reads[k]++ | ||
} | ||
} | ||
table(['under way', 'fast', 'slow'], [['writes to other accounts', int(c.other[0]), int(c.other[1])], ['writes to the same account', int(c.same[0]), int(c.same[1])], ['reads', int(c.reads[0]), int(c.reads[1])]]) | ||
out.push(`Slow writes: ${int(slowN)}.`, '') | ||
| ||
if (samples.length) { | ||
// Slow writes against the disk's flush time and spec-pds's slow syncs, a sample apart. | ||
const steps = [] | ||
for (let i = 1; i < samples.length; i++) { | ||
const a = samples[i - 1], b = samples[i] | ||
if (!a.disk || !b.disk) continue | ||
const slow = reqs.filter((r) => r.time > a.time && r.time <= b.time && WRITES.test(r.method) && r.ms > 200).length | ||
const syncs = a.specFsync?.['+Inf'] != null && b.specFsync?.['+Inf'] != null && b.specFsync['+Inf'] >= a.specFsync['+Inf'] ? (b.specFsync['+Inf'] - b.specFsync['0.1']) - (a.specFsync['+Inf'] - a.specFsync['0.1']) : null | ||
steps.push({ time: b.time, slow, flushMs: b.disk.flushMs - a.disk.flushMs, syncs }) | ||
} | ||
if (steps.length > 2) { | ||
out.push('### Slow writes against the disk, a sample apart', '') | ||
table(['period', 'samples', 'r: slow writes ~ disk flush time', 'r: slow syncs ~ disk flush time'], periods().map((p) => { | ||
const ss = steps.filter((s) => s.time >= p[0] && s.time < p[1]) | ||
const sy = ss.filter((s) => s.syncs != null) | ||
return [label(p), ss.length, num(corr(ss.map((s) => s.flushMs), ss.map((s) => s.slow)), 2), num(corr(sy.map((s) => s.flushMs), sy.map((s) => s.syncs)), 2)] | ||
})) | ||
} | ||
} | ||
} | ||
| ||
console.log(out.join('\n')) | ||
bench/soak/README.md+22−1
| @@ -81,4 +81,25 @@ on the same data (`dev.mjs --keep`), and run with `SETTLE_ONLY=1` and | ||
| ||
## Results | ||
| ||
`RESULTS.md`, with the runs' files in `data/`. | ||
`RESULTS.md` holds the runs, each run's files in `data/<run>/`, and every | ||
table in it is the output of `analyze.mjs` for them: | ||
| ||
```sh | ||
node bench/soak/analyze.mjs bench/soak/data/<run> [--split <ISO time>]... [--from <ISO>] [--to <ISO>] | ||
``` | ||
| ||
It reads what a run's directory holds: the soak's `summary-*.json` and | ||
`events-*.jsonl`; a sampler's `samples.jsonl` and `kills.jsonl`, where one | ||
ran beside it (each minute, each server's RSS, CPU and data directory, the | ||
free space, and spec-pds's fsync histogram and the disk's flush counters); | ||
and spec-pds's log cut to its `request`, `start`, `shutdown` and warning | ||
lines as `server-log.jsonl`, each gzipped or not. It answers the soak's | ||
totals and times, the kills, memory and data over time, the syncs against | ||
the disk's flushes, each method's times on the server, `createRecord`'s by | ||
period with the minute after each start apart, what a slow write held up, | ||
and the settled check. `--split` cuts the time into periods, as before and | ||
after a change. | ||
| ||
A run is added by putting its files in a directory of `data/`, a | ||
description and its command in `RESULTS.md`, and the command's output | ||
under it. | ||
bench/soak/RESULTS.md+444−84
528 lines changed: not loaded until asked for.
docs/guide/comparing.md+11−0
| @@ -289,6 +289,17 @@ holds the runs, beside the reference. | ||
OUT=/tmp/soak TARGET_URL=http://127.0.0.1:2594 TARGET_DOMAIN=test node bench/soak/soak.mjs | ||
``` | ||
| ||
`bench/soak/analyze.mjs` makes every table of `RESULTS.md` from a run's | ||
files: the soak's own, a sampler's where one ran beside it, and the | ||
server's log cut to its requests and starts. Each run in `RESULTS.md` is | ||
its description, its command and that command's output, so running the | ||
command again checks it; a run is added the same way, its files in a | ||
directory of `bench/soak/data/`. | ||
| ||
```sh | ||
node bench/soak/analyze.mjs bench/soak/data/at-rest | ||
``` | ||
| ||
### Compatibility | ||
| ||
`harness/compat.mjs` checks how closely any PDS behaves like the | ||