[pr-performance] Collect census import details only with --missing #330

Manually merged
TrustNo1 merged 1 commit from qnjk/Darner:perf-census-skip-unused-missing-details into main 2026-12-05 04:49:02 +00:00
Contributor

Tested offline with a local Xbox executable. Gameplay and timing were not measured.

Contributor role (optional)

  • Fluxer ID:

What it changes

darner census currently builds the per-symbol list of missing imports and the sets of images that use them, even when the command only prints summary counts. Collect that detail only when --missing is present. A regression test checks that the summary still counts a repeated missing symbol once without the detail collector.

How it was tested

  • Tested revision: f3840d73d3504c30218debfbc8795b9225447317 plus this patch, Rust 1.98.1 on Windows.
  • cargo test --locked -p darner --bin darner census::tests: 4 passed.
  • cargo test --locked -p darner --test census: 2 passed.
  • cargo clippy --locked -p darner --all-targets -- -D warnings: passed.
  • cargo xtask policy: 555 files passed.
  • Compared stdout byte for byte on one local executable with darner census --strict <title-exe> and with --missing added. Both reports matched the prior build's original census implementation. The detailed report had 489 rows. The executable's SHA-256 matched before and after.
  • Changes a default: no user-visible change.
  • A/B result: output parity checked for both report modes. No timing claim.
  • Gates run: none of the three workspace-wide gates. Targeted checks are listed above.
  • Gameplay: not tested. Census reads the executable without launching it.
  • Shader wave sizes tested: not applicable.
  • Hardware dependence: tested on Windows.
  • Coverage gaps: other platforms and end-to-end timing.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
    • The affected command was exercised offline with a local executable.
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: none found.
  • Replaces or overlaps: none found.
Tested offline with a local Xbox executable. Gameplay and timing were not measured. ## Contributor role (optional) - Fluxer ID: ## What it changes `darner census` currently builds the per-symbol list of missing imports and the sets of images that use them, even when the command only prints summary counts. Collect that detail only when `--missing` is present. A regression test checks that the summary still counts a repeated missing symbol once without the detail collector. ## How it was tested - Tested revision: `f3840d73d3504c30218debfbc8795b9225447317` plus this patch, Rust 1.98.1 on Windows. - `cargo test --locked -p darner --bin darner census::tests`: 4 passed. - `cargo test --locked -p darner --test census`: 2 passed. - `cargo clippy --locked -p darner --all-targets -- -D warnings`: passed. - `cargo xtask policy`: 555 files passed. - Compared stdout byte for byte on one local executable with `darner census --strict <title-exe>` and with `--missing` added. Both reports matched the prior build's original census implementation. The detailed report had 489 rows. The executable's SHA-256 matched before and after. - Changes a default: no user-visible change. - A/B result: output parity checked for both report modes. No timing claim. - Gates run: none of the three workspace-wide gates. Targeted checks are listed above. - Gameplay: not tested. Census reads the executable without launching it. - Shader wave sizes tested: not applicable. - Hardware dependence: tested on Windows. - Coverage gaps: other platforms and end-to-end timing. ## Checklist - [ ] I ran this change in the game, or say below why it can't be (docs, tests only). - The affected command was exercised offline with a local executable. - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: none found. - Replaces or overlaps: none found.
First-time contributor

Independent Windows build, gate, and code-read review of 137ab6c4c (full head 137ab6c4cf5ae77044e550faf29c820a276f60e4, based on main f3840d73d3504c30218debfbc8795b9225447317). Not run in-game.

Environment

  • Windows 11 Pro 26H2 (build 26300.10075), Intel Core i9-14900K, NVIDIA RTX A2000 12GB (driver 621.47), Rust 1.98.1 (x86_64-pc-windows-msvc), MSVC 19.44.35230.

Measured results

  • Gate 1 (cargo clippy --workspace --all-targets --locked -- -D warnings): PASS.
  • Gate 2 (cargo clippy --workspace --all-targets --all-features --locked -- -D warnings): PASS.
  • cargo xtask policy: PASS (asset policy: 555 files ok).
  • cargo test --locked -p darner --bin darner census::tests: PASS (4 passed; 0 failed; 0 ignored).
  • cargo test --locked -p darner --test census: PASS (2 passed; 0 failed; 0 ignored).
  • No runtime timing or executable-output comparison was performed in this independent check.

Code-read audit

  • run creates the detail map only when list_missing is true, while still passing every parsed image through tally_image; summary output and aggregate counts remain independent of that map (apps/darner/src/census.rs:50-92, 96-119).
  • tally_image continues classifying all normal and delay imports and increments stats.missing once per unique FunctionKey; only the per-symbol/per-image detail insertion is conditional (census.rs:143-170). The sorted detail report remains gated on Some(missing) (census.rs:121-128).
  • The new synthetic test repeats a missing symbol with different hints and checks the summary counts without a detail collector; existing tests exercise detail aggregation across images and delay imports (census.rs:354-373, 233-298).

No blocking issue found; the requested detail collection is skipped for summary-only runs without changing the summary-count path.

Verdict: PASS.

AI-assisted: yes (GitHub Copilot, Auto mode).

Independent Windows build, gate, and code-read review of `137ab6c4c` (full head `137ab6c4cf5ae77044e550faf29c820a276f60e4`, based on `main` `f3840d73d3504c30218debfbc8795b9225447317`). Not run in-game. ### Environment - Windows 11 Pro 26H2 (build 26300.10075), Intel Core i9-14900K, NVIDIA RTX A2000 12GB (driver 621.47), Rust 1.98.1 (`x86_64-pc-windows-msvc`), MSVC 19.44.35230. ### Measured results - Gate 1 (`cargo clippy --workspace --all-targets --locked -- -D warnings`): **PASS**. - Gate 2 (`cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`): **PASS**. - `cargo xtask policy`: **PASS** (`asset policy: 555 files ok`). - `cargo test --locked -p darner --bin darner census::tests`: **PASS** (`4 passed; 0 failed; 0 ignored`). - `cargo test --locked -p darner --test census`: **PASS** (`2 passed; 0 failed; 0 ignored`). - No runtime timing or executable-output comparison was performed in this independent check. ### Code-read audit - `run` creates the detail map only when `list_missing` is true, while still passing every parsed image through `tally_image`; summary output and aggregate counts remain independent of that map (`apps/darner/src/census.rs:50-92`, `96-119`). - `tally_image` continues classifying all normal and delay imports and increments `stats.missing` once per unique `FunctionKey`; only the per-symbol/per-image detail insertion is conditional (`census.rs:143-170`). The sorted detail report remains gated on `Some(missing)` (`census.rs:121-128`). - The new synthetic test repeats a missing symbol with different hints and checks the summary counts without a detail collector; existing tests exercise detail aggregation across images and delay imports (`census.rs:354-373`, `233-298`). No blocking issue found; the requested detail collection is skipped for summary-only runs without changing the summary-count path. **Verdict: PASS.** AI-assisted: yes (GitHub Copilot, Auto mode).
TrustNo1 manually merged commit 3d303c3d9f into main 2026-12-05 04:49:02 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!330
No description provided.