Skip to content

Configuration

Iain Smith edited this page Aug 28, 2026 · 1 revision

Configuration

loadbearer run takes its settings from three places, in this order of precedence:

  1. Command-line switches — always win.
  2. A --config TOML file — fills in anything not given on the command line.
  3. Built-in defaults — used for anything neither of the above sets.

Only run reads the config file. compare, info, list and baseline don't take one.

The file

TOML, every key optional. Unknown keys are rejected with an error listing the valid ones, so a typo fails loudly instead of being ignored. A full example ships as loadbearer.example.toml.

Key Type Equivalent switch Default
profile string --profile "general"
duration "short" | "normal" | "thorough" --duration "normal"
curve_k float, 0.05–3.0 --curve-k 0.5
target_dir path --target-dir the working directory
runs integer --runs preset default (3 / 5 / 9)
seed integer --seed a fixed built-in seed
only array of strings --only all benchmarks

Output-mode flags (--plain, --json, --output) are command-line only — they're about how this invocation reports, not a standing preference.

Examples

A team standard

Check a loadbearer.toml into your repo so everyone runs the same assessment:

profile   = "dev-workstation"
duration  = "thorough"
target_dir = "/var/tmp"        # a real disk, not /tmp if that's tmpfs
loadbearer run --config loadbearer.toml --output "$(hostname).json"

CI smoke check

Fast, deterministic, machine-readable, and disk skipped so it doesn't hammer the runner's storage:

duration = "short"
seed     = 1
only     = ["cpu", "memory"]
loadbearer run --config ci.toml --json > result.json
jq -e '.overall.score >= 700' result.json

Overriding one thing

The config sets the defaults; a switch overrides just that key:

# ci.toml says duration=short, but do a proper run this once
loadbearer run --config ci.toml --duration thorough

Reproducibility

seed fixes the pseudo-random data the workloads are generated from (buffer contents, random I/O offsets), so two runs on the same machine and build differ only by genuine measurement noise, not by input. It does not make timings identical — that's what the repeated iterations and confidence flags are for. See Accuracy Notes.

Clone this wiki locally