Commit 5c1040c
committed
test(audience-sample): capture player-side profile on Linux PlayMode runs
Adds PlayerProfilerLogger gated on UNITY_STANDALONE_LINUX and the
AUDIENCE_PLAYER_PROFILE_PATH env var. At BeforeSceneLoad inside the
test player process, points UnityEngine.Profiling.Profiler at the
configured path and starts a binary log of every captured frame.
PR #764 captured a deep profile of the editor process. The actual test
loop runs in a separate PlayerWithTests subprocess that the editor
launches and waits on. The editor profile only showed roughly 86 sec
of editor activity over a 27 min cell, the rest being editor idle
waiting on the player. This hook plugs that gap.
Wires the env var through the playmode-linux job's docker run and
adds player-profile.raw to the upload-artifact path so the capture is
downloadable for offline analysis in Unity Editor.
Note: enables regular profiling, not deep. Deep profiling on the
player would need -deepprofiling on the player command line, which
Unity Test Framework does not expose for editor-launched test
players. Regular profiling still surfaces per-frame CPU and the
function hot list, which is what we need to identify what is eating
roughly 37 sec per test.1 parent 2d03ea7 commit 5c1040c
3 files changed
Lines changed: 79 additions & 0 deletions
File tree
- .github/workflows
- examples/audience/Assets/SampleApp/Tests/Runtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| 471 | + | |
471 | 472 | | |
472 | 473 | | |
473 | 474 | | |
| |||
484 | 485 | | |
485 | 486 | | |
486 | 487 | | |
| 488 | + | |
487 | 489 | | |
488 | 490 | | |
489 | 491 | | |
| |||
737 | 739 | | |
738 | 740 | | |
739 | 741 | | |
| 742 | + | |
740 | 743 | | |
741 | 744 | | |
742 | 745 | | |
| |||
Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments