Document routing between placed crossings and archive development records
This commit is contained in:
parent
e4d5952677
commit
2c260e5e95
1 changed files with 161 additions and 102 deletions
|
|
@ -55,7 +55,7 @@ def _render_markdown(payload: dict[str, object]) -> str:
|
|||
"",
|
||||
f"Generated on {payload['generated_on']} by `{payload['generator']}`.",
|
||||
"",
|
||||
"The full machine-readable snapshot lives in `docs/performance_baseline.json`.",
|
||||
"The full machine-readable snapshot is in [performance_baseline.json](performance_baseline.json).",
|
||||
"Use `scripts/diff_performance_baseline.py` to compare a fresh run against that snapshot.",
|
||||
"",
|
||||
"| Scenario | Duration (s) | Total | Valid | Reached | Iter | Nets Routed | Nodes | Ray Casts | "
|
||||
|
|
@ -88,7 +88,7 @@ def _render_markdown(payload: dict[str, object]) -> str:
|
|||
"",
|
||||
"## Full Counter Set",
|
||||
"",
|
||||
"Each scenario entry in `docs/performance_baseline.json` records the full `RouteMetrics` snapshot, "
|
||||
"Each scenario entry in the JSON records the full `RouteMetrics` snapshot, "
|
||||
"including cache, index, congestion, and verification counters.",
|
||||
"These counters are currently observational only and are not enforced as CI regression gates.",
|
||||
"",
|
||||
|
|
@ -106,7 +106,7 @@ def main() -> None:
|
|||
"--output-dir",
|
||||
type=Path,
|
||||
default=None,
|
||||
help="Directory to write performance_baseline.json and performance.md into. Defaults to <repo>/docs.",
|
||||
help="Directory to write performance_baseline.json and performance.md into. Defaults to <repo>/archive/routing.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--scenario",
|
||||
|
|
@ -123,13 +123,13 @@ def main() -> None:
|
|||
args = parser.parse_args()
|
||||
|
||||
repo_root = Path(__file__).resolve().parents[1]
|
||||
docs_dir = repo_root / "docs" if args.output_dir is None else args.output_dir.resolve()
|
||||
docs_dir.mkdir(exist_ok=True)
|
||||
output_dir = repo_root / "archive" / "routing" if args.output_dir is None else args.output_dir.resolve()
|
||||
output_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
selected = tuple(args.scenarios) if args.scenarios else None
|
||||
payload = _build_payload(selected, include_performance_only=args.include_performance_only)
|
||||
json_path = docs_dir / "performance_baseline.json"
|
||||
markdown_path = docs_dir / "performance.md"
|
||||
json_path = output_dir / "performance_baseline.json"
|
||||
markdown_path = output_dir / "performance.md"
|
||||
|
||||
json_path.write_text(json.dumps(payload, indent=2, sort_keys=True) + "\n")
|
||||
markdown_path.write_text(_render_markdown(payload))
|
||||
|
|
|
|||
Loading…
Reference in a new issue