#!/usr/bin/env python3 """Sample passage density vertically and along representative rock/open-air floors.""" from __future__ import annotations import os import subprocess from pathlib import Path ROOT = Path(__file__).resolve().parents[4] OUT = ROOT / "Saved/Linux/l114" BINARY = ROOT / "Saved/Linux/l114/bin/VoxelForgeCoreHeadless-l114-clang" DATA = ROOT / "Standalone/data/owner_world.json" def main() -> int: OUT.mkdir(parents=True, exist_ok=True) log = OUT / "audit-owner-clang.log" layout = OUT / "audit-layout-candidate.json" command = [ "taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--", "timeout", "1740s", str(BINARY), str(DATA), "--world-assembler-prototype", "--stream-benchmark", "--stream-pipeline", "--workers=12", "--clip-radius=3", "--max-clip-level=8", "--max-level=8", "--camera=8,16,-372.2626953125,0,0", "--audit-resolved-layout-passages", f"--resolved-layout-output={layout}", ] with log.open("w", encoding="utf-8") as stream: result = subprocess.run(command, cwd=ROOT, env={**os.environ, "VOXELFORGE_L114_DENSITY_PROFILE": "1"}, stdout=stream, stderr=subprocess.STDOUT, check=False, timeout=1740) print(f"[L114DensityProbe] exit={result.returncode} log={log.relative_to(ROOT)}", flush=True) return result.returncode if __name__ == "__main__": raise SystemExit(main())