Skip to content

[#110] Add Player build report example queries matching Project Auditor views#111

Merged
SkowronskiAndrew merged 2 commits into
mainfrom
issue110
Jul 24, 2026
Merged

[#110] Add Player build report example queries matching Project Auditor views#111
SkowronskiAndrew merged 2 commits into
mainfrom
issue110

Conversation

@SkowronskiAndrew

Copy link
Copy Markdown
Collaborator

Summary

Fixes #110.

The Project Auditor package has useful views of BuildReport data (build summary, size by runtime type, and objects grouped by source asset, file extension, build file, etc.), but they do not scale well to very large builds and only cover the last Player build. UnityDataTool already imports the same raw BuildReport data into SQLite, which handles millions of objects and any number of past reports — but SQL is less approachable than a built-in UI. This PR bridges that gap with a documentation page that maps each Project Auditor Build view to an equivalent short query, with real example output, and adds a small schema addition where plain SQL would have been awkward.

Changes

Documentation

  • New page Documentation/analyze-examples-buildreport.md (following the analyze-examples-contentlayout.md naming convention): each Project Auditor Build view mapped to a query with genuine output snippets, including group-by/drill-down query pairs mirroring the UI's collapsed/expanded grouping. Includes one Project Auditor screenshot to anchor the mapping.
  • Example output is based on a Unity 6.6 Windows Player build of the Happy Harvest sample project. The report is committed as TestCommon/Data/BuildReports/happyHarvest.buildreport so the output is reproducible; it also gives the tests a larger 6.6 report with a ContentSummary and diverse content.
  • Cross-links added from buildreport.md and analyze-examples.md.
  • The importer-type grouping is documented as intentionally unsupported (the importer is Editor-side information); grouping by source file extension is the documented equivalent.

Schema

  • build_report_source_assets gains asset_name (filename without extension) and asset_extension (lower-cased, without the dot) columns, computed in PackedAssetsHandler because extracting them in SQLite SQL is awkward. Both are exposed by build_report_packed_asset_contents_view, making all the documented groupings one-line GROUP BY queries.

Testing

  • dotnet test — full suite green (761 passed, 10 skipped, pre-existing platform skips).
  • New Analyze_BuildReport_HappyHarvest_MatchesDocumentedExamples test pins the example numbers shown in the documentation (including that the PackedAssets per-type totals match the ContentSummary).
  • New assertions for asset_name/asset_extension in the existing PackedAssets test.
  • Manually verified every documented query's output against the Project Auditor UI showing the same build.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a set of reproducible “Project Auditor Build view → SQLite query” examples for Player build reports, and introduces small schema enhancements to make the documented groupings easy and performant.

Changes:

  • Added a new documentation page with short, UI-mirroring queries (including example output) for common BuildReport analyses.
  • Extended the BuildReport PackedAssets schema to expose asset_name and asset_extension for convenient grouping in SQL.
  • Added/extended tests and test data to pin the documented example outputs and validate the new derived columns.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
UnityDataTool.Tests/BuildReportTests.cs Adds assertions for asset_name/asset_extension and a new Happy Harvest regression test that pins documented query outputs.
TestCommon/Data/BuildReports/README.md Documents the new happyHarvest.buildreport test fixture and its purpose.
Documentation/buildreport.md Adds a cross-link to the new Player build report example queries and documents the new derived columns.
Documentation/analyze-examples.md Adds a cross-link to the new BuildReport-focused examples page.
Documentation/analyze-examples-buildreport.md New doc page mapping Project Auditor Build views to equivalent SQLite queries with real output snippets.
Analyzer/SQLite/Handlers/PackedAssetsHandler.cs Computes and inserts asset_name / asset_extension derived from build_time_asset_path during import.
Analyzer/Resources/PackedAssets.sql Adds asset_name / asset_extension columns to build_report_source_assets and exposes them via build_report_packed_asset_contents_view.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Update AGENTS.md so that this happens more reliably in future edits.
@SkowronskiAndrew

Copy link
Copy Markdown
Collaborator Author

I'll put this in now so that the new page goes live, we may do some small updates based on further testing.

@SkowronskiAndrew
SkowronskiAndrew merged commit 6a586c7 into main Jul 24, 2026
5 checks passed
@SkowronskiAndrew
SkowronskiAndrew deleted the issue110 branch July 24, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Analyze - BuildReport support - document how to match Project Auditor data views

2 participants