perf(prepare): log workers, pipelines/s and RSS during pipeline builds #2721

Open
github-sync wants to merge 1 commit from github/pr/2721 into main
Owner

@yeetbot90 opened this pull request on GitHub · 2026-11-12 09:21 UTC · original

Summary

  • Enrich the 10s prepare progress lines (predicted/noted pipelines) with worker count, pipelines/s, process RSS/peak and available RAM.
  • Prefer a recent-rate ETA and print finishing near the end instead of a runaway overall ETA (seen as thousands of minutes at 99%).
  • Log worker sizing at the start of prepare_run / predict_run / precompile_run, and RSS on the predicted-pipelines summary line.
  • Add tests/test_prepare_progress_stats.py; update the prepare-stall fixture stub.

This is measure-only (no worker-count behavior change). It supports diagnosing slow prepares across NVIDIA/AMD/Intel before adaptive pool work.

Test plan

  • python -I -B tests/test_prepare_progress_stats.py
  • python -I -B tests/test_prepare_cpus.py
  • python -I -B tests/test_prepare_stall.py --cxx <llvm-mingw clang++>
  • Rebuild hookshot_vk.dll (RX_VK_ONLY=1, llvm-mingw) into D:\Hookshot_OOT; --prepare-shaders on AMD RX 9070 XT / Windows
  • Predicted-pipelines summary carries rate + RSS: predicted 50623 pipelines ... in 7.5 s (... 4.7 s building them on 24 threads, 10594.2/s; RSS 14716 MB, peak 14718, avail 2380 MB) (warm VkCache ~3.4 GB; build finished under the 10 s progress interval, so mid-run /s / finishing lines did not fire — covered by test_prepare_progress_stats.py)
  • Worker start line: predicted pipelines: building 50623 on 24 workers (usable 24)

Made with Cursor

> [@yeetbot90](https://github.com/yeetbot90) opened this pull request on GitHub · 2026-11-12 09:21 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2721) ## Summary - Enrich the 10s prepare progress lines (predicted/noted pipelines) with worker count, pipelines/s, process RSS/peak and available RAM. - Prefer a recent-rate ETA and print `finishing` near the end instead of a runaway overall ETA (seen as thousands of minutes at 99%). - Log worker sizing at the start of `prepare_run` / `predict_run` / `precompile_run`, and RSS on the predicted-pipelines summary line. - Add `tests/test_prepare_progress_stats.py`; update the prepare-stall fixture stub. This is measure-only (no worker-count behavior change). It supports diagnosing slow prepares across NVIDIA/AMD/Intel before adaptive pool work. ## Test plan - [x] `python -I -B tests/test_prepare_progress_stats.py` - [x] `python -I -B tests/test_prepare_cpus.py` - [x] `python -I -B tests/test_prepare_stall.py --cxx <llvm-mingw clang++>` - [x] Rebuild `hookshot_vk.dll` (`RX_VK_ONLY=1`, llvm-mingw) into `D:\Hookshot_OOT`; `--prepare-shaders` on AMD RX 9070 XT / Windows - [x] Predicted-pipelines summary carries rate + RSS: `predicted 50623 pipelines ... in 7.5 s (... 4.7 s building them on 24 threads, 10594.2/s; RSS 14716 MB, peak 14718, avail 2380 MB)` (warm VkCache ~3.4 GB; build finished under the 10 s progress interval, so mid-run `/s` / `finishing` lines did not fire — covered by `test_prepare_progress_stats.py`) - [x] Worker start line: `predicted pipelines: building 50623 on 24 workers (usable 24)` Made with [Cursor](https://cursor.com) <!-- github-sync:item:2721 -->
Player logs could not tell whether a slow prepare was driver-bound, under-threaded or paging. Enrich the 10s progress lines and the predicted-pipelines summary, and say finishing near the end instead of a runaway ETA.

Co-authored-by: Cursor <[email protected]>
Author
Owner

@Joey-Magnus requested changes on GitHub · 2026-11-12 14:34 UTC · original

I merged this into current main and ran tests/test_prepare_progress_stats.py, test_prepare_cpus.py and test_prepare_stall.py: all pass. Two things before it can go in.

The new paragraph in docs/development.md:203 is inserted in the middle of the build-switch table, between the RX_RELEASE and RX_PGO rows. That ends the table there, so RX_PGO, RX_HOT_OPT, RX_MARCH, RX_VK_ONLY and OOT_* render as loose pipe text. It needs to go after the table.

This also conflicts with your worker-count stack: merging it and #2729 together conflicts in gpu/vk/vk_draw.cpp, because both add a "building N on M workers" line in prepare_run, precompile_run and predict_run, in two different formats. Both also add a RAM/RSS reader (prepare_mem_mb here, prepare_ram_mb/prepare_process_mb there). I'd fold this into the same PR as the worker counts so there's one memory helper and one log format. Otherwise the second one to land redoes the first.

The PR description should also open with why the PR is needed (the Discord "stuck at 99%" ETA is the reason) rather than a summary list.

> [@Joey-Magnus](https://github.com/Joey-Magnus) requested changes on GitHub · 2026-11-12 14:34 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2721#pullrequestreview-5876239898) I merged this into current main and ran tests/test_prepare_progress_stats.py, test_prepare_cpus.py and test_prepare_stall.py: all pass. Two things before it can go in. The new paragraph in docs/development.md:203 is inserted in the middle of the build-switch table, between the `RX_RELEASE` and `RX_PGO` rows. That ends the table there, so `RX_PGO`, `RX_HOT_OPT`, `RX_MARCH`, `RX_VK_ONLY` and `OOT_*` render as loose pipe text. It needs to go after the table. This also conflicts with your worker-count stack: merging it and #2729 together conflicts in gpu/vk/vk_draw.cpp, because both add a "building N on M workers" line in prepare_run, precompile_run and predict_run, in two different formats. Both also add a RAM/RSS reader (`prepare_mem_mb` here, `prepare_ram_mb`/`prepare_process_mb` there). I'd fold this into the same PR as the worker counts so there's one memory helper and one log format. Otherwise the second one to land redoes the first. The PR description should also open with why the PR is needed (the Discord "stuck at 99%" ETA is the reason) rather than a summary list. <!-- github-sync:r:5876239898 -->
Commenting is not possible because the repository is archived.
No description provided.