feat(queue): stats: send tells where the submitting thread's time in a submission goes, part by part (with VICTORY_QUEUE_STATS) #641

Open
github-bot wants to merge 2 commits from github-bot/gh-641 into main AGit
Owner

@⁠Raptorbk45 on GitHub · 2026-12-05 22:37 UTC · original
Raptorbk45:feat/send-stats → main · +984 −9 · 12 files · 2 commits · open

Needs merged first

This branch is stacked on #640 (it prints next to stats: lane_stood and checks its parts against worked_send_ms); its own change is the last commit.

With VICTORY_QUEUE_STATS=1, a stats: send line splits the lane's time in its submissions (Job::Run/Job::Joined) into parts: lock, flights, sweep, ask, front, the lists' steps (step_copy, step_placed, step_run), fill, tex, flush, finish, prelude, last, card, heaps, waiting, execute, noting, waits for lists to land (land_most, land_other), reset, and other. Nested parts are taken out so they add up to worked_send_ms; gap_ms says by how much they do not, and valid whether that is within tolerance. Also counts of steps, copies, refreshes, uploads and first uploads, lock waits, front texture/buffer CPU time, MiB of textures read a frame, and how long staged textures wait from creation to their first submission.

Off by default; with the switch off each instrumented point costs one thread-local check, and no line is printed.

How it was checked

Run after the final edit, on Linux (CachyOS), against main at 8c4e6633:

  • ./build.sh check (release, MSVC target): passes; the one warning (room_lately never used, resource.rs) is already on main
  • cargo xtask policy: passes
  • PROFILE=diag ./build.sh check: passes
  • PKG=victory-gpu ./build.sh test --lib -- send_stats under Wine: 3 passed

Not run: the game, on this branch. On main texture refreshes go through Staging::refresh, where the texture byte counts were moved (on our fork they sat in a refresh path main does not have).

Branch head: c9e9ee21.

Tests in send_stats.rs: parts_against_the_lane_s_measure, nested_parts_count_once_and_go_back, stage_spans (the accounting; they fail if nesting double-counts).

Checks

  • One subject
  • Off by default
  • Docs: docs/DIAGNOSTICS.md
  • Tests named above
  • Queue checked: no other PR instruments the submission path this way
  • cargo xtask policy
**@⁠Raptorbk45** on GitHub · 2026-12-05 22:37 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/641) `Raptorbk45:feat/send-stats` → `main` · +984 −9 · 12 files · 2 commits · open ## Needs merged first - [ ] #640 This branch is stacked on #640 (it prints next to `stats: lane_stood` and checks its parts against `worked_send_ms`); its own change is the last commit. With `VICTORY_QUEUE_STATS=1`, a `stats: send` line splits the lane's time in its submissions (`Job::Run`/`Job::Joined`) into parts: `lock`, `flights`, `sweep`, `ask`, `front`, the lists' steps (`step_copy`, `step_placed`, `step_run`), `fill`, `tex`, `flush`, `finish`, `prelude`, `last`, `card`, `heaps`, `waiting`, `execute`, `noting`, waits for lists to land (`land_most`, `land_other`), `reset`, and `other`. Nested parts are taken out so they add up to `worked_send_ms`; `gap_ms` says by how much they do not, and `valid` whether that is within tolerance. Also counts of steps, copies, refreshes, uploads and first uploads, lock waits, front texture/buffer CPU time, MiB of textures read a frame, and how long staged textures wait from creation to their first submission. Off by default; with the switch off each instrumented point costs one thread-local check, and no line is printed. ## How it was checked Run after the final edit, on Linux (CachyOS), against `main` at 8c4e6633: - `./build.sh check` (release, MSVC target): passes; the one warning (`room_lately` never used, `resource.rs`) is already on `main` - `cargo xtask policy`: passes - `PROFILE=diag ./build.sh check`: passes - `PKG=victory-gpu ./build.sh test --lib -- send_stats` under Wine: 3 passed Not run: the game, on this branch. On `main` texture refreshes go through `Staging::refresh`, where the texture byte counts were moved (on our fork they sat in a refresh path `main` does not have). Branch head: `c9e9ee21`. Tests in `send_stats.rs`: `parts_against_the_lane_s_measure`, `nested_parts_count_once_and_go_back`, `stage_spans` (the accounting; they fail if nesting double-counts). ## Checks - [x] One subject - [x] Off by default - [x] Docs: `docs/DIAGNOSTICS.md` - [x] Tests named above - [x] Queue checked: no other PR instruments the submission path this way - [x] `cargo xtask policy`
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 22:39:34 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/641/head:github-bot/gh-641'
git switch 'github-bot/gh-641'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-641'
git switch 'github-bot/gh-641'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-641'
git switch 'github-bot/gh-641'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-641'
git switch 'main'
git merge --squash 'github-bot/gh-641'
git switch 'main'
git merge --ff-only 'github-bot/gh-641'
git switch 'main'
git merge 'github-bot/gh-641'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.