Documentation backlog
Topics worth writing for getbent.io when there is time and focus. These are documentation plans, not code tasks—unlike plotting.md and metview.md.
How to use this file
- Check off
- [ ]→- [x]when a page or substantial section ships on the docs site. - Existing links point at partial coverage in repo or docs today.
- Nested bullets mirror the original outline; sub-items can ship independently.
Already documented (reference)
| Area | Location |
|---|---|
| Overview, workloads, getting started | docs/index.md, docs/intro.md |
| Setup, running, results, reports | docs/setup.md, docs/running.md, docs/results.md, docs/reports.md |
| Workloads (pgbench, OSM, CBC) | docs/workloads/ |
| Tuning studies | docs/model/ |
| Troubleshooting, versions | docs/troubleshooting.md, docs/versions.md |
Backlog
Database-first design
Explain how pgbent’s feature set and implementation reflect a database-first application style: the results DB as the system of record, shell scripts as thin orchestration, SQL views and reports as the primary analysis interface, and graphing/streamlit as consumers—not separate silos of state.
- Design essay — why separate test vs results databases;
$RESULTPSQL; views over raw tables; auditable workloads vs opaque pipelines- Existing:
docs/index.md§ Design philosophy (brief);docs/intro.md§ Metrics; AGENTS.md § Architecture - Tie to: schema hierarchy, query cookbook, set comparisons, replication (this backlog)
- Existing:
Sample schema
Document the results-database hierarchy: how server → test set → script → scale → clients → test run fit together, and what each table holds.
- Server / set / script / scale / clients hierarchy
- Existing:
init/resultdb.sql(server,testset,tests);docs/intro.md§ Test sets;docs/results.md§ Test sets comparison - Include: serial numbers,
testset.info, multi-serverservercolumn, relationship totest_wrap/ summary views
- Existing:
Benchmark parameter space
Document how pgbent thinks about tests as a five-dimensional space, with test set holding configuration constant while exploring the grid. Defer a standalone docs page until there is UI to demonstrate; capture the model here for now.
Dimensions:
- Client —
tests.clients - Scale —
tests.scale,dbsize - Workload script —
tests.script(SELECT, INSERT, OSM, …) - Read vs write blend — script mix,
rate_limit, workload phase - Locality — cache warmth, working-set fit, connection path, OSM node cache, etc. (define explicitly when writing)
- Parameter space and pivots — test set as comparison slice; default 2D face (client × scale) in
webreport; SQLGROUP BYas manual pivot around one axis; ranges/partitions across a dimension- Existing:
docs/intro.md(client × scale only);limited_webreport,reports/compromise_params.sql; implementation direction in goals.md § Parameter-space explorer - Future home: section under Results internals or extension of intro/results (not
docs/benchmark-space.mduntil warranted)
- Existing:
Basic log format
Document what pgbent writes during a run and how it lands in the results DB.
- Queries — pgbench log lines, latency samples, custom SQL capture format
- Existing:
timingtable (CSV staging),testssummary columns;export-latency-metric.sqlas OHLC export sketch
- Existing:
- Capture automation and process pruning — how collectors start/stop, zombie cleanup on crash
- Existing:
benchwarmer,metrics2csv,util/pgbent_powermon; known issue in plotting.md backlog
- Existing:
Metric import ideas
- Patterns for bringing external metrics into
test_metrics_data(formats, naming, registration inmetrics_info)- Existing:
init/metrics_map.csv,metrics_infoprefix/multiplier model,metview.pyquery as consumer example
- Existing:
Database metrics suggestions
End-to-end guide for Postgres-side metrics collection.
- Capture scripts — periodic SQL attached to a run (
pg_stat_*,pg_buffercache, custom) - Parsing scripts — shell/Python that normalizes collector output
- Existing:
metrics2csv,util/pgbench-init-parse,util/power-sensors-parse
- Existing:
- Intermediate storage
- Multi-column vs single-value metric formats (
test_stat_databasewide rows vstest_metrics_dataname/value pairs) - Existing:
init/resultdb.sql(test_stat_database,test_statio,test_bgwriter,test_metrics_data)
- Multi-column vs single-value metric formats (
Sample processing queries
Worked examples readers can run against the results DB.
- Latency as a metric — OHLC and similar time-bucket aggregations over
timing- Existing:
export-latency-metric.sql; per-second min/avg/max inmetview.py/test_metric_summary
- Existing:
- Buffer stats — reads from
test_bgwriter, buffer-cache views, checkpoint pressure- Existing:
reports/bufreport.sql,reports/bufsummary.sql,reports/write_internals.sql
- Existing:
- MB/s comparison table — throughput columns on
test_stats/ submission views- Existing:
test_stats(hit_bps,read_bps,check_bps, …); Streamlit explorer
- Existing:
- Views
- Combining test and DB metrics in one query (
test_metrics_decode, joins totests) - Latency and metrics overlays on a shared time axis
- Overlay builder app — choose fields to overlay (fun standalone tool; document spec even if unbuilt)
- Existing:
test_metrics,test_metrics_decode,test_metric_summaryininit/resultdb.sql;metview.py(single-metric time series)
- Combining test and DB metrics in one query (
Query aggregation
Patterns for heavy or rolling analysis over large result sets.
- Materialized queries — when to pre-aggregate vs live views
- Streaming window — rolling windows over
test_metrics_data/timingwithout loading full runs into memory- Existing:
date_truncgrouping inmetview.py,reports/SQL examples
- Existing:
Set comparisons
- How test sets are defined, compared, and graphed across configuration changes
- Existing:
docs/results.md,docs/reports.md;./webreport,./limited_webreport,./rates_webreport;reports/compromise_params.sql
- Existing:
Replication to central node
- Architecture for consolidating results from multiple benchmark hosts into one results database
- Existing: multi-
serverschema ininit/resultdb.sql;explorer/submission-explore.py,explorer/results-bridge.sql(partial)
- Existing: multi-
Use
Operator-facing workflows once data is in the results DB.
- Web report —
./webreportoutput layout, regeneration, HTML underresults/- Existing:
docs/results.md; implementation plan in plotting.md (gnuplot → Python)
- Existing:
- Crosstab comparison charts — client × scale grids, set-over-set overlays
- Existing: gnuplot scripts in
plots/;reports/compare.py,reports/bars.py
- Existing: gnuplot scripts in
- Test CRUD — insert/update/delete tests and sets, cleanup bad runs
- Existing:
docs/reports.md§ cleanups;latest_set,list_orderbysethelpers mentioned in reports doc
- Existing:
Suggested doc structure (when writing)
These topics likely become one or more pages under a new Results internals or Metrics guide section rather than scattered edits:
- Database-first design (framing essay)
- Schema and hierarchy (Sample schema) 1b. Benchmark parameter space (five dimensions, pivots, test set as slice)
- Capture pipeline (Basic log format + Database metrics suggestions)
- Storage formats (Intermediate storage)
- Query cookbook (Sample processing queries + Query aggregation)
- Comparison and publishing (Set comparisons + Use)
- Multi-host (Replication)
Out of scope here
- Agent/developer workflow → AGENTS.md
- Code roadmaps → plotting.md, metview.md
- Inline
# TODOin source → stay near the code
Writing conventions
- Match tone of
docs/intro.mdanddocs/results.mdfor operational guides;docs/model/*.mdfor measured tuning write-ups. - Link to Streamlit results or
reports/*.sqlwhen citing examples. - Images live under
docs/images/for the Jekyll site.