Skip to content

HA Sim Test Options

Willem edited this page Aug 24, 2026 · 1 revision

HA-Sim Test Tool — Command-line Options

Usage

ha_sim_test [options] [recipes ...]

Positional recipes are recipe IDs (e.g. R01 R11 R47). If omitted, all registered recipes run.

Options

Flag Default Description
--parallel N 1 Run across N containers. Instance 1 is ha-sim; instances 2+ get a suffix (ha-sim-2, ha-sim-3, …).
--container-base NAME ha-sim Base container name. Instance 1 uses this directly; instances 2+ append a suffix.
--port PORT 8124 Starting HA port for instance 1. Instances 2+ use port+1, port+2, etc.
--assign CONTAINER:R1,R2,... — Manual recipe assignment (advanced). Example: --assign ha-sim-2:R01,R02. Can be repeated. Unassigned recipes are auto-distributed.
--cleanup off Stop and remove parallel containers (instances 2+) and their cloned config dirs after the run. Without this flag, containers are stopped but config dirs are kept for warm restarts. Instance 1 (ha-sim) is always left running.
--wait-scale-blind FACTOR 0.5 Scale factor for fixed wait() blind sleeps. E.g. 0.5 halves all 5s/10s/… sleeps. The dominant cost is ~80 calls to wait(5) totalling ~400s at full scale.
--wait-scale-poll FACTOR 0.08 Scale factor for wait_for() timeout ceilings. Polling returns early, so this only tightens the failure ceiling. Safe to cut aggressively on the simulator.
--wait-floor-blind SECONDS 3 Global minimum (real-time seconds) for all blind wait() sleeps. Protects sensitive waits (scan engine, sync, entity hydration) when using aggressive --wait-scale-blind.
--wait-floor-poll SECONDS — Global minimum for all wait_for() timeout ceilings. The per-call floor= parameter (e.g. wait_for_ha_ready uses floor=10) takes the max with this.
--reports-dir DIR ~/.local/share/ramses_extras/ha_sim_reports Directory to write log and summary reports into. Created if it does not exist.

Environment variables

Variable Maps to Notes
HA_SIM_TEST_WAIT_SCALE_BLIND --wait-scale-blind Set if you want a persistent override without passing the flag.
HA_SIM_TEST_WAIT_SCALE_POLL --wait-scale-poll Same as above for poll ceilings.

Examples

Run all recipes on a single container

python -m tools.ha_sim_test

Run specific recipes

python -m tools.ha_sim_test R01 R11 R47 R67

Parallel across 3 containers with cleanup

python -m tools.ha_sim_test --parallel 3 --cleanup

Manual recipe assignment

python -m tools.ha_sim_test --parallel 2 \
  --assign ha-sim:R01,R02,R03 \
  --assign ha-sim-2:R04,R05,R06

Faster runs (aggressive wait scaling)

python -m tools.ha_sim_test --wait-scale-blind 0.3 --wait-floor-blind 2

Custom reports directory

python -m tools.ha_sim_test --reports-dir /tmp/my_reports

Back to: HA-Sim Test Tool

Clone this wiki locally